/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: #eef2ff;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.5;
}

/* ========================================
   Container & Layout
======================================== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   Demo Card
======================================== */
.demo-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.demo-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
    color: var(--white);
}

.demo-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.demo-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   Input Groups
======================================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    color: var(--primary);
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-wrapper input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    cursor: pointer;
}

.date-input-wrapper input:hover {
    border-color: var(--gray-300);
}

.date-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.date-input-wrapper input::placeholder {
    color: var(--gray-400);
}

.date-input-wrapper input.has-value {
    font-weight: 500;
    color: var(--gray-900);
}

.input-icon,
.input-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.input-icon:hover,
.input-clear:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.input-clear {
    right: 2.5rem;
    color: var(--gray-400);
}

.input-clear:hover {
    color: var(--danger);
    background: #fef2f2;
}

.hidden {
    display: none !important;
}

/* Date Range */
.date-range-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-range-wrapper .date-input-wrapper {
    flex: 1;
}

.range-separator {
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* ========================================
   Selected Info Display
======================================== */
.selected-info {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--gray-200);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.info-value {
    font-weight: 600;
    color: var(--gray-800);
}

/* ========================================
   Features Card
======================================== */
.features-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.features-card h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-card h3 i {
    color: var(--warning);
}

.features-card ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.features-card li {
    font-size: 0.85rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-card li i {
    color: var(--success);
    font-size: 0.75rem;
}

/* ========================================
   Calendar Dropdown
======================================== */
.calendar-dropdown {
    position: fixed;
    z-index: 1000;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.calendar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* When calendar opens above the input */
.calendar-dropdown.above {
    transform: translateY(10px) scale(0.98);
}

.calendar-dropdown.above.active {
    transform: translateY(0) scale(1);
}

.calendar-container {
    display: flex;
}

/* ========================================
   Calendar Main
======================================== */
.calendar-main {
    padding: 1rem;
    width: 300px;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.25rem;
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.nav-btn:active {
    transform: scale(0.95);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    user-select: none;
}

.title-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.title-btn:hover {
    background: var(--primary-bg);
}

.title-btn:hover .current-month,
.title-btn:hover .current-year {
    color: var(--primary);
}

.current-month {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    transition: var(--transition);
}

.current-year {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: var(--transition);
}

/* Month & Year Picker Views */
.month-picker,
.year-picker {
    padding: 0.5rem 0;
}

.year-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.year-range-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

.picker-grid {
    display: grid;
    gap: 0.5rem;
}

.month-grid {
    grid-template-columns: repeat(3, 1fr);
}

.year-grid {
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns x 3 rows = 12 years */
}

.picker-cell {
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: center;
}

.picker-cell:hover:not(.disabled) {
    background: var(--primary-bg);
    color: var(--primary);
}

.picker-cell:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.picker-cell.current {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.picker-cell.selected {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.picker-cell.disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

/* Weekdays */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem;
}

.weekday.weekend {
    color: var(--primary-light);
}

/* Days Grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.day:hover:not(.disabled):not(.empty) {
    background: var(--primary-bg);
    color: var(--primary);
}

.day:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.day:active:not(.disabled):not(.empty) {
    transform: scale(0.92);
}

.day.empty {
    visibility: hidden;
}

.day.disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

.day.other-month {
    color: var(--gray-300);
}

.day.other-month:hover:not(.disabled) {
    color: var(--gray-500);
    background: var(--gray-100);
}

.day.today {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
}

.day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.day.selected {
    background: var(--primary) !important;
    color: var(--white) !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.day.selected::after {
    display: none;
}

.day.weekend:not(.selected):not(.disabled) {
    color: var(--primary-light);
}

/* Calendar Footer */
.calendar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.footer-today {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
}

.footer-btn {
    padding: 0.5rem 0.875rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-cancel:hover {
    background: var(--gray-200);
}

.btn-today {
    background: var(--primary);
    color: var(--white);
}

.btn-today:hover {
    background: var(--primary-dark);
}

/* ========================================
   Animations
======================================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.day.selected {
    animation: pulse 0.3s ease;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .demo-header {
        padding: 1.5rem;
    }

    .demo-header h1 {
        font-size: 1.4rem;
    }

    .demo-content {
        padding: 1.5rem;
    }

    .date-range-wrapper {
        flex-direction: column;
    }

    .date-range-wrapper .date-input-wrapper {
        width: 100%;
    }

    .range-separator {
        transform: rotate(90deg);
    }

    .features-card ul {
        grid-template-columns: 1fr;
    }

    .calendar-dropdown {
        left: 50% !important;
        transform: translateX(-50%) translateY(-10px) scale(0.98);
        width: calc(100% - 2rem);
        max-width: 360px;
    }

    .calendar-dropdown.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .calendar-main {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .calendar-dropdown {
        display: none;
    }
}


/* ========================================
   PORTFOLIO MODE — Global Overrides
======================================== */
body.portfolio-mode {
    background: #f0f2f7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   PORTFOLIO HERO
======================================== */
.pf-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a21caf 100%);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}

.pf-hero-inner {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.pf-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.pf-hero-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.pf-hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255,255,255,0.82);
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.pf-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.pf-htag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    transition: background 0.2s;
}

.pf-htag:hover {
    background: rgba(255,255,255,0.22);
}

/* ========================================
   KEYBOARD SHORTCUTS BAR
======================================== */
.pf-shortcuts-bar {
    background: #1e293b;
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
}

.pf-shortcuts-bar .pf-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    min-width: max-content;
}

.pf-shortcuts-label {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pf-shortcuts-list {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
}

.pf-shortcuts-list span {
    color: #cbd5e1;
    font-size: 0.8rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

kbd {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.72rem;
    color: #e2e8f0;
    line-height: 1.4;
}

/* ========================================
   PORTFOLIO LAYOUT
======================================== */
.pf-main {
    padding: 3rem 1.5rem 4rem;
}

.pf-container {
    max-width: 1160px;
    margin: 0 auto;
}

/* ========================================
   SECTIONS
======================================== */
.pf-section {
    margin-bottom: 4.5rem;
}

.pf-section-head {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.pf-section-num {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.pf-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.pf-section-desc {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pf-section-desc code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
}

/* ========================================
   GRIDS
======================================== */
.pf-grid {
    display: grid;
    gap: 1.5rem;
}

.pf-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pf-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ========================================
   CARDS
======================================== */
.pf-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.pf-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pf-card-wide {
    grid-column: 1 / -1;
}

.pf-card-sm .pf-card-head {
    padding: 1.25rem 1.25rem 0.75rem;
}

.pf-card-sm .pf-card-body {
    padding: 0 1.25rem 1rem;
}

.pf-card-sm .pf-code {
    margin-top: auto;
}

.pf-card-head {
    padding: 1.5rem 1.5rem 1rem;
}

.pf-card-body {
    padding: 0 1.5rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pf-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0.5rem 0 0.4rem;
    letter-spacing: -0.01em;
}

.pf-card-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.65;
    margin: 0;
}

.pf-card-desc code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82em;
}

.pf-fmt-eg {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.pf-fmt-eg strong {
    color: var(--primary);
}

/* ========================================
   PILLS / BADGES
======================================== */
.pf-pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pf-pill-blue   { background: #dbeafe; color: #1d4ed8; }
.pf-pill-purple { background: #ede9fe; color: #6d28d9; }
.pf-pill-orange { background: #ffedd5; color: #c2410c; }
.pf-pill-green  { background: #d1fae5; color: #065f46; }
.pf-pill-red    { background: #fee2e2; color: #b91c1c; }
.pf-pill-amber  { background: #fef3c7; color: #92400e; }
.pf-pill-teal   { background: #ccfbf1; color: #0f766e; }
.pf-pill-indigo { background: #e0e7ff; color: #3730a3; }
.pf-pill-pink   { background: #fce7f3; color: #9d174d; }

/* ========================================
   CODE BLOCKS
======================================== */
.pf-code {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    margin-top: auto;
}

.pf-code-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: #1e293b;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pf-code pre {
    margin: 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.pf-code code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #93c5fd;
    line-height: 1.75;
    white-space: pre;
}

/* ========================================
   RESULT / FEEDBACK DISPLAYS
======================================== */
.pf-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    color: #166534;
    font-size: 0.85rem;
    font-weight: 500;
}

.pf-result i {
    color: var(--success);
    flex-shrink: 0;
}

.pf-result-info {
    background: var(--primary-bg);
    border-color: #c7d2fe;
    color: #3730a3;
}

.pf-result-info i {
    color: var(--primary);
}

/* ========================================
   HINTS
======================================== */
.pf-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #f8fafc;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--gray-500);
}

.pf-hint i { color: var(--primary); flex-shrink: 0; }

.pf-hint-amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pf-hint-amber i { color: #f59e0b; }

.pf-hint-teal { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.pf-hint-teal i { color: #14b8a6; }

/* ========================================
   DATE RANGE SECTION
======================================== */
.pf-range-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.pf-range-row .input-group {
    flex: 1;
}

.pf-range-arrow {
    flex-shrink: 0;
    color: var(--gray-400);
    font-size: 0.9rem;
    padding-bottom: 0.9rem;
}

/* ========================================
   WEEK START COMPARISON
======================================== */
.pf-compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pf-compare-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pf-compare-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}

.pf-compare-label code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
}

/* ========================================
   SVG ICON UTILITY
======================================== */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

/* ========================================
   MULTI-FORMAT OUTPUT (CALLBACK DEMO)
======================================== */
.pf-multiformat-placeholder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 1.5px dashed var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-400);
    font-size: 0.85rem;
}

.pf-multiformat {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.pf-mf-title {
    padding: 0.6rem 0.9rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pf-mf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.pf-mf-chip {
    padding: 0.65rem 0.9rem;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.pf-mf-chip:nth-child(2n) {
    border-right: none;
}

.pf-mf-chip:nth-last-child(-n+2) {
    border-bottom: none;
}

.pf-mf-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-family: 'Fira Code', monospace;
}

.pf-mf-val {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-family: 'Fira Code', monospace;
}

/* ========================================
   ORIENTATION SECTION
======================================== */
.pf-orient-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.pf-orient-options code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
}

/* ========================================
   FOOTER
======================================== */
.pf-footer {
    background: #1e293b;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.pf-footer p {
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE — Portfolio
======================================== */
@media (max-width: 900px) {
    .pf-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .pf-hero {
        padding: 3.5rem 1.25rem 3rem;
    }

    .pf-grid-2,
    .pf-grid-3 {
        grid-template-columns: 1fr;
    }

    .pf-section-head {
        flex-direction: row;
        align-items: flex-start;
    }

    .pf-range-row {
        flex-direction: column;
    }

    .pf-range-arrow {
        transform: rotate(90deg);
        padding-bottom: 0;
        align-self: center;
    }

    .pf-compare-row {
        grid-template-columns: 1fr;
    }

    .pf-mf-grid {
        grid-template-columns: 1fr;
    }

    .pf-mf-chip:nth-child(2n) {
        border-right: 1px solid var(--gray-100);
    }

    .pf-mf-chip:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--gray-100);
    }

    .pf-mf-chip:last-child {
        border-bottom: none;
    }

    .pf-shortcuts-bar .pf-container {
        gap: 1rem;
    }
}
