/* ═══════════════════════════════════════════════════════════════
   HEADFACE — plans.css
   Responsive, student-focused subscription & plans stylesheet.
   Adheres strictly to HEADFACE design tokens:
   Navy, Deep Blue, Mint, Cyan, White, Mist, and Ink.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Core Brand Tokens */
  --hf-navy:        #07101f;
  --hf-navy-deep:   #040a14;
  --hf-navy-surface:#0c1a33;
  --hf-navy-card:   #11203d;
  --hf-navy-light:  #182a4d;
  
  --hf-deep-blue:   #0b2a8f;
  --hf-blue:        #2b5cff;
  --hf-blue-hover:  #1c46de;
  --hf-brand:       #6136ff;
  
  --hf-mint:        #4ee0b5;
  --hf-mint-glow:   rgba(78, 224, 181, 0.28);
  --hf-mint-soft:   #c9f6e6;
  --hf-cyan:        #38bdf8;
  --hf-cyan-glow:   rgba(56, 189, 248, 0.25);
  
  --hf-white:       #ffffff;
  --hf-mist:        #eef3f8;
  --hf-slate-100:   #f1f5f9;
  --hf-slate-200:   #e2e8f0;
  --hf-slate-300:   #cbd5e1;
  --hf-slate-400:   #94a3b8;
  --hf-slate-500:   #64748b;
  
  --hf-ink:         #0c1730;
  --hf-ink-muted:   #51607f;
  
  --hf-border-glass: rgba(255, 255, 255, 0.08);
  --hf-border-light: rgba(255, 255, 255, 0.15);
  --hf-border-mint:  rgba(78, 224, 181, 0.35);
  
  --hf-font-main: 'Prompt', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hf-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  
  --hf-radius-sm: 8px;
  --hf-radius-md: 14px;
  --hf-radius-lg: 20px;
  --hf-radius-xl: 28px;
  --hf-radius-full: 9999px;
  
  --hf-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --hf-transition-fast: 0.2s var(--hf-ease);
  --hf-transition-normal: 0.35s var(--hf-ease);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--hf-font-main);
  background-color: var(--hf-navy);
  color: var(--hf-white);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--hf-font-main);
  background: var(--hf-navy);
  color: var(--hf-white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--hf-mint);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
.hf-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 68px;
  background: rgba(7, 16, 31, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hf-border-glass);
  display: flex;
  align-items: center;
  transition: background var(--hf-transition-fast), border-color var(--hf-transition-fast);
}

.hf-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.15em;
  color: var(--hf-white);
}

.hf-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--hf-radius-sm);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hf-nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .hf-nav-links {
    display: flex;
  }
}

.hf-nav-link {
  color: var(--hf-slate-400);
  transition: color var(--hf-transition-fast);
  position: relative;
  padding: 6px 0;
}

.hf-nav-link:hover {
  color: var(--hf-white);
}

.hf-nav-link.active {
  color: var(--hf-mint);
}

.hf-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hf-mint);
  border-radius: 2px;
}

.hf-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hf-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--hf-navy-surface);
  border: 1px solid var(--hf-border-glass);
  border-radius: var(--hf-radius-full);
  font-size: 13px;
  color: var(--hf-slate-200);
}

.hf-user-badge {
  font-family: var(--hf-font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--hf-radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

.hf-badge-free {
  background: rgba(148, 163, 184, 0.18);
  color: var(--hf-slate-300);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.hf-badge-plus {
  background: rgba(78, 224, 181, 0.16);
  color: var(--hf-mint);
  border: 1px solid rgba(78, 224, 181, 0.4);
}

.hf-badge-max {
  background: rgba(56, 189, 248, 0.18);
  color: var(--hf-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.hf-hero {
  position: relative;
  padding: 56px 24px 36px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(43, 92, 255, 0.16) 0%, transparent 65%),
              radial-gradient(circle at 80% 25%, rgba(78, 224, 181, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
              var(--hf-navy);
}

.hf-hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hf-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--hf-radius-full);
  font-family: var(--hf-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-mint);
  background: rgba(78, 224, 181, 0.08);
  border: 1px solid rgba(78, 224, 181, 0.25);
  margin-bottom: 20px;
}

.hf-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hf-mint);
  box-shadow: 0 0 8px var(--hf-mint);
}

.hf-hero-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.28;
  color: var(--hf-white);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hf-hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--hf-slate-300);
  max-width: 640px;
  margin: 0 auto 12px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hf-hero-note {
  font-size: 13px;
  color: var(--hf-slate-400);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════
   CURRENT PLAN STATUS CARD (R2)
   ═══════════════════════════════════════════════════════════════ */
.hf-current-plan-wrapper {
  max-width: 1180px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.hf-current-card {
  position: relative;
  background: linear-gradient(135deg, rgba(17, 32, 61, 0.95) 0%, rgba(11, 42, 143, 0.35) 100%);
  border: 1px solid rgba(78, 224, 181, 0.3);
  border-radius: var(--hf-radius-xl);
  padding: 24px 28px;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.45),
              0 0 24px rgba(78, 224, 181, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color var(--hf-transition-normal), box-shadow var(--hf-transition-normal);
}

@media (min-width: 768px) {
  .hf-current-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
  }
}

.hf-current-card.is-unauth {
  border-color: var(--hf-border-glass);
  background: linear-gradient(135deg, rgba(12, 26, 51, 0.9) 0%, rgba(7, 16, 31, 0.9) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hf-current-card.is-free {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(16, 28, 52, 0.9) 0%, rgba(20, 38, 70, 0.6) 100%);
}

.hf-current-card.is-plus {
  border-color: rgba(78, 224, 181, 0.45);
  box-shadow: 0 14px 40px -6px rgba(0, 0, 0, 0.5), 0 0 32px rgba(78, 224, 181, 0.14);
}

.hf-current-card.is-max {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(15, 30, 65, 0.95) 0%, rgba(43, 92, 255, 0.3) 100%);
  box-shadow: 0 14px 40px -6px rgba(0, 0, 0, 0.5), 0 0 32px rgba(56, 189, 248, 0.15);
}

.hf-current-card.is-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(28, 16, 28, 0.95) 0%, rgba(17, 24, 39, 0.9) 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
}

.hf-current-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hf-current-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hf-current-label {
  font-family: var(--hf-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hf-slate-400);
}

.hf-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--hf-radius-full);
  font-size: 11px;
  font-weight: 600;
  background: rgba(78, 224, 181, 0.14);
  color: var(--hf-mint);
  border: 1px solid rgba(78, 224, 181, 0.3);
}

.hf-status-tag.inactive {
  background: rgba(148, 163, 184, 0.12);
  color: var(--hf-slate-400);
  border-color: rgba(148, 163, 184, 0.25);
}

.hf-status-tag.expired {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.hf-status-tag.error {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.hf-current-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--hf-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hf-current-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 6px;
}

.hf-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hf-meta-label {
  font-size: 11px;
  color: var(--hf-slate-400);
}

.hf-meta-val {
  font-family: var(--hf-font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--hf-slate-200);
}

.hf-current-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--hf-radius-full);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: transform var(--hf-transition-fast), background var(--hf-transition-fast), box-shadow var(--hf-transition-fast);
}

.hf-btn:hover {
  transform: translateY(-1px);
}

.hf-btn:active {
  transform: translateY(1px);
}

.hf-btn-mint {
  background: var(--hf-mint);
  color: var(--hf-navy);
  box-shadow: 0 4px 16px rgba(78, 224, 181, 0.25);
}

.hf-btn-mint:hover {
  background: #70edd0;
  box-shadow: 0 6px 20px rgba(78, 224, 181, 0.4);
}

.hf-btn-blue {
  background: var(--hf-blue);
  color: var(--hf-white);
  box-shadow: 0 4px 16px rgba(43, 92, 255, 0.3);
}

.hf-btn-blue:hover {
  background: var(--hf-blue-hover);
  box-shadow: 0 6px 20px rgba(43, 92, 255, 0.45);
}

.hf-btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hf-white);
  border: 1px solid var(--hf-border-light);
}

.hf-btn-glass:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hf-btn-disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--hf-slate-400);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════
   PLAN COMPARISON GRID (R3 & R4)
   ═══════════════════════════════════════════════════════════════ */
.hf-plans-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.hf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hf-card-max {
    grid-column: span 2;
  }
}

@media (min-width: 1025px) {
  .hf-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

/* Plan Card Base */
.hf-plan-card {
  background: var(--hf-navy-card);
  border: 1px solid var(--hf-border-glass);
  border-radius: var(--hf-radius-xl);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--hf-transition-normal), border-color var(--hf-transition-normal), box-shadow var(--hf-transition-normal);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.hf-plan-card:hover {
  transform: translateY(-4px);
}

/* FREE Card */
.hf-card-free {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #0e1b34 0%, #091325 100%);
}

.hf-card-free:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
}

/* HEADFACE+ (Featured / Popular) */
.hf-card-plus {
  border: 2px solid var(--hf-mint);
  background: linear-gradient(180deg, #11264b 0%, #0c1935 100%);
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.6), 0 0 36px rgba(78, 224, 181, 0.18);
}

.hf-card-plus:hover {
  border-color: #70edd0;
  box-shadow: 0 20px 52px -10px rgba(0, 0, 0, 0.65), 0 0 44px rgba(78, 224, 181, 0.28);
}

/* MAX Card */
.hf-card-max {
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, #122146 0%, #0b152c 100%);
  box-shadow: 0 16px 48px -10px rgba(0, 0, 0, 0.6), 0 0 36px rgba(56, 189, 248, 0.12);
}

.hf-card-max:hover {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 20px 52px -10px rgba(0, 0, 0, 0.65), 0 0 44px rgba(56, 189, 248, 0.22);
}

/* Featured Ribbon */
.hf-featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hf-mint);
  color: var(--hf-navy);
  font-family: var(--hf-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 16px;
  border-radius: var(--hf-radius-full);
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(78, 224, 181, 0.35);
  z-index: 10;
}

/* Card Header */
.hf-card-head {
  margin-bottom: 24px;
}

.hf-card-tier-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--hf-white);
  margin-bottom: 6px;
}

.hf-card-tier-desc {
  font-size: 13px;
  color: var(--hf-slate-400);
  line-height: 1.5;
  min-height: 40px;
}

.hf-price-box {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hf-price-val {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hf-white);
  font-family: var(--hf-font-main);
}

.hf-price-unit {
  font-size: 13px;
  color: var(--hf-slate-400);
}

/* Shared LYNX Callout Box */
.hf-lynx-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--hf-radius-md);
  padding: 14px 16px;
  margin-bottom: 24px;
}

.hf-card-plus .hf-lynx-box {
  border-color: rgba(78, 224, 181, 0.25);
  background: rgba(78, 224, 181, 0.04);
}

.hf-card-max .hf-lynx-box {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.04);
}

.hf-lynx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hf-lynx-title {
  font-size: 11px;
  font-family: var(--hf-font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hf-slate-400);
}

.hf-card-plus .hf-lynx-title {
  color: var(--hf-mint);
}

.hf-card-max .hf-lynx-title {
  color: var(--hf-cyan);
}

.hf-lynx-badge {
  font-size: 10px;
  font-family: var(--hf-font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hf-slate-300);
}

.hf-lynx-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--hf-white);
  font-family: var(--hf-font-mono);
}

.hf-lynx-note {
  font-size: 11px;
  color: var(--hf-slate-400);
  margin-top: 2px;
}

/* Feature List Inside Card */
.hf-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex: 1;
}

.hf-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--hf-slate-200);
  line-height: 1.45;
}

.hf-feat-item.disabled {
  color: var(--hf-slate-500);
}

.hf-feat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hf-icon-check {
  color: var(--hf-mint);
}

.hf-icon-cross {
  color: var(--hf-slate-500);
}

/* Card CTA Action Slot */
.hf-card-action {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hf-card-action .hf-btn {
  width: 100%;
}

.hf-no-purchase-note {
  text-align: center;
  font-size: 13px;
  color: var(--hf-slate-500);
  padding: 10px 0;
}

/* ═══════════════════════════════════════════════════════════════
   DETAILED COMPARISON TABLE (R3 Grouping)
   ═══════════════════════════════════════════════════════════════ */
.hf-table-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.hf-table-head-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.hf-table-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--hf-white);
  margin-bottom: 8px;
}

.hf-table-sub {
  font-size: 14px;
  color: var(--hf-slate-400);
}

.hf-table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--hf-mint);
  margin-bottom: 12px;
  font-family: var(--hf-font-mono);
}

@media (min-width: 768px) {
  .hf-table-scroll-hint {
    display: none;
  }
}

.hf-table-container {
  background: var(--hf-navy-card);
  border: 1px solid var(--hf-border-glass);
  border-radius: var(--hf-radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.5);
  max-width: 100%;
}

.hf-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  width: 100%;
}

.hf-table-scroll::-webkit-scrollbar {
  height: 6px;
}

.hf-table-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--hf-radius-full);
}

.hf-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(78, 224, 181, 0.35);
  border-radius: var(--hf-radius-full);
}

.hf-compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 14px;
}

.hf-compare-table th,
.hf-compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hf-compare-table th {
  background: rgba(12, 26, 51, 0.95);
  font-weight: 700;
  color: var(--hf-white);
}

.hf-col-tier {
  text-align: center !important;
  width: 22%;
}

.hf-compare-table td.hf-col-tier {
  text-align: center;
  font-family: var(--hf-font-mono);
  font-size: 13px;
  color: var(--hf-slate-200);
}

.hf-group-row td {
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--hf-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hf-mint);
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(78, 224, 181, 0.15);
}

.hf-compare-table tr:hover td:not([colspan]) {
  background: rgba(255, 255, 255, 0.02);
}

.hf-table-feat-name {
  font-weight: 600;
  color: var(--hf-white);
  display: block;
}

.hf-table-feat-desc {
  font-size: 12px;
  color: var(--hf-slate-400);
  margin-top: 2px;
}

.hf-pill-val {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--hf-radius-full);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--hf-slate-200);
}

.hf-pill-val.plus {
  background: rgba(78, 224, 181, 0.14);
  color: var(--hf-mint);
  border: 1px solid rgba(78, 224, 181, 0.28);
}

.hf-pill-val.max {
  background: rgba(56, 189, 248, 0.14);
  color: var(--hf-cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL / DIALOG (R4)
   ═══════════════════════════════════════════════════════════════ */
.hf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 20, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--hf-transition-normal);
}

.hf-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hf-modal-card {
  position: relative;
  background: var(--hf-navy-card);
  border: 1px solid rgba(78, 224, 181, 0.3);
  border-radius: var(--hf-radius-xl);
  padding: 32px 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(78, 224, 181, 0.12);
  transform: scale(0.95);
  transition: transform var(--hf-transition-normal);
  color: var(--hf-white);
  text-align: center;
}

.hf-modal-close-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--hf-slate-400);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--hf-transition-fast);
}

.hf-modal-close-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--hf-white);
  border-color: rgba(255, 255, 255, 0.25);
}

.hf-modal-close-icon:focus-visible {
  outline: 2px solid var(--hf-mint);
  outline-offset: 2px;
}

.hf-modal-backdrop.is-open .hf-modal-card {
  transform: scale(1);
}

.hf-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(78, 224, 181, 0.14);
  color: var(--hf-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(78, 224, 181, 0.3);
}

.hf-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hf-modal-body {
  font-size: 14px;
  color: var(--hf-slate-300);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hf-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hf-modal-actions .hf-btn {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.4;
  padding: 10px 18px;
}

@media (min-width: 480px) {
  .hf-modal-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE VIEWPORT GUARDS (375px mobile & 768px tablet)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hf-hero {
    padding: 40px 16px 28px;
  }
  .hf-current-plan-wrapper {
    padding: 0 16px 28px;
  }
  .hf-plans-section {
    padding: 0 16px 48px;
  }
  .hf-table-section {
    padding: 0 16px 64px;
  }
  .hf-current-card {
    padding: 20px 20px;
  }
  .hf-current-meta-grid {
    gap: 12px 20px;
  }
}

@media (max-width: 480px) {
  .hf-nav {
    height: 60px;
  }
  .hf-nav-inner {
    padding: 0 14px;
    gap: 8px;
  }
  .hf-brand {
    font-size: 14px;
    gap: 8px;
    letter-spacing: 0.1em;
  }
  .hf-brand-logo {
    width: 26px;
    height: 26px;
  }
  .hf-nav-actions {
    gap: 6px;
  }
  .hf-user-pill {
    padding: 3px 8px;
    font-size: 11px;
    gap: 6px;
  }
  .hf-user-badge {
    font-size: 10px;
    padding: 1px 5px;
  }
  .hf-current-card {
    padding: 18px 16px;
  }
  .hf-current-name {
    font-size: 20px;
  }
  .hf-plan-card {
    padding: 26px 20px;
  }
  .hf-price-val {
    font-size: 30px;
  }
  .hf-modal-card {
    padding: 24px 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.hf-footer {
  border-top: 1px solid var(--hf-border-glass);
  background: var(--hf-navy-deep);
  padding: 40px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--hf-slate-500);
}

.hf-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (min-width: 768px) {
  .hf-footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION (R5)
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hf-plan-card:hover,
  .hf-btn:hover {
    transform: none !important;
  }
}
