/* ============================================
   BASE STYLES - Apply to all screen sizes
   ============================================ */

:root {
    --content-padding-xl: 16px;
    --content-padding-large: 12px;
    --content-padding-medium: 8px;
    --content-padding-small: 4px;
    --content-padding-tiny: 2px;
    
    /* Base font sizes */
    --base-font-size-xl: 1em;
    --base-font-size-large: 1em;
    --base-font-size-medium: 0.9375em;
    --base-font-size-small: 0.875em;
    --base-font-size-tiny: 0.8125em;
    
    /* Heading font sizes - Base (1400+) */
    --heading-h1-xl: 3em;
    --heading-h2-xl: 1.75em;
    --heading-h3-xl: 1.5em;
    --heading-h4-xl: 1.25em;
    
    /* Heading font sizes - Large (1080-1400) */
    --heading-h1-large: 2.5em;
    --heading-h2-large: 1.5em;
    --heading-h3-large: 1.35em;
    --heading-h4-large: 1.15em;
    
    /* Heading font sizes - Medium (700-1080) */
    --heading-h1-medium: 2em;
    --heading-h2-medium: 1.35em;
    --heading-h3-medium: 1.25em;
    --heading-h4-medium: 1.1em;
    
    /* Heading font sizes - Small (550-700) */
    --heading-h1-small: 1.75em;
    --heading-h2-small: 1.25em;
    --heading-h3-small: 1.15em;
    --heading-h4-small: 1.05em;
    
    /* Heading font sizes - Tiny (below 550) */
    --heading-h1-tiny: 1.5em;
    --heading-h2-tiny: 1.15em;
    --heading-h3-tiny: 1.1em;
    --heading-h4-tiny: 1em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: var(--base-font-size-xl);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    line-height: 1.8;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 20px 8px 20px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-container {
    display: grid;
    grid-template-columns: 1fr minmax(200px, auto) 1fr;
    grid-template-rows: auto auto;
    gap: 15px 30px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

/* Base grid positioning for featured cards */
.white-card-link {
    grid-column: 1;
    grid-row: 1;
}

.black-card-link {
    grid-column: 3;
    grid-row: 1;
}

.green-card-link {
    grid-column: 1;
    grid-row: 2;
}

.red-card-link {
    grid-column: 3;
    grid-row: 2;
}

.header-title-section {
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: center;
    cursor: pointer;
    padding: clamp(12px, 2vw + 8px, 20px);
    border-radius: 15px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(218, 165, 32, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.header-title-section:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(218, 165, 32, 0.15) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
}

.header-title-section h1 {
    font-size: clamp(1em, 3vw + 0.3em, 2.8em);
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 700;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(0.9em, 1.5vw + 0.5em, 1.2em);
    color: #a0a0a0;
    font-style: italic;
}

.subtext-quote {
    font-style: italic;
    color: #888;
    font-size: 0.9em;
    margin-top: 8px;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.header-quote-wrapper {
    text-align: center;
    margin-top: 8px;
}

.header-quote {
    font-style: italic;
    color: #999;
    font-size: 1em;
    margin: 0;
}

.featured-card-link {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}

.white-card-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(200, 200, 200, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #E0E0E0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.white-card-link:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.green-card-link {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.2) 0%, rgba(0, 100, 0, 0.2) 100%);
    border: 2px solid rgba(34, 139, 34, 0.5);
    color: #228B22;
    box-shadow: 0 0 20px rgba(34, 139, 34, 0.2);
}

.green-card-link:hover {
    border-color: rgba(34, 139, 34, 0.8);
    box-shadow: 0 0 30px rgba(34, 139, 34, 0.4);
    transform: translateY(-2px);
}

.black-card-link {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 2px solid rgba(100, 100, 100, 0.6);
    color: #999999;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.black-card-link:hover {
    border-color: rgba(150, 150, 150, 0.9);
    box-shadow: 0 0 30px rgba(100, 100, 100, 0.6);
    transform: translateY(-2px);
}

.red-card-link {
    background: linear-gradient(135deg, rgba(220, 20, 20, 0.2) 0%, rgba(139, 0, 0, 0.2) 100%);
    border: 2px solid rgba(220, 20, 20, 0.6);
    color: #DC1414;
    box-shadow: 0 0 20px rgba(220, 20, 20, 0.3);
    animation: pulse-red-subtle 3s ease-in-out infinite;
}

.red-card-link:hover {
    border-color: rgba(220, 20, 20, 0.9);
    box-shadow: 0 0 30px rgba(220, 20, 20, 0.5);
    transform: translateY(-2px);
}

@keyframes pulse-red-subtle {
    0%, 100% { box-shadow: 0 0 20px rgba(220, 20, 20, 0.3); }
    50% { box-shadow: 0 0 30px rgba(220, 20, 20, 0.5); }
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 1em;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.search-box::placeholder {
    color: #888;
}

.category-filter,
.card-type-filter {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    color: #602080;
    font-size: 1em;
    cursor: pointer;
}

.category-filter option:disabled,
.card-type-filter option:disabled {
    color: #666;
    font-style: italic;
    background-color: rgba(255, 255, 255, 0.02);
}

.stats {
    color: #888;
    font-size: 0.9em;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.guide-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.35);
    border-radius: 15px;
    padding: 0;
    cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    height: 360px;
}

.guide-card .scroll-wrapper {
    height: 100%;
    padding: var(--content-padding-xl);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    position: relative;
    display: flex;
    flex-direction: column;
}

.guide-card .scroll-wrapper::-webkit-scrollbar {
    width: 0;
}

.guide-card:hover .scroll-wrapper,
.guide-card:focus-within .scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(72, 92, 178, 0.85) transparent;
}

.guide-card:hover .scroll-wrapper::-webkit-scrollbar,
.guide-card:focus-within .scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.guide-card:hover .scroll-wrapper::-webkit-scrollbar-track,
.guide-card:focus-within .scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(12, 18, 34, 0.55);
    border-radius: 10px;
}

.guide-card:hover .scroll-wrapper::-webkit-scrollbar-thumb,
.guide-card:focus-within .scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(72, 92, 178, 0.95) 0%, rgba(48, 66, 138, 0.95) 100%);
    border-radius: 10px;
    border: 1px solid rgba(8, 12, 26, 0.6);
}

.guide-card .card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.guide-card:hover::before {
    left: 100%;
}

.guide-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.guide-card.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: #667eea;
}

.guide-card h3 {
    font-size: 1.3em;
    color: #667eea;
}

.guide-card .card-description {
    color: #b0b0b0;
    font-size: 0.9em;
    margin-bottom: 15px;
    white-space: pre-line;
}

.red-disclaimer {
    margin-top: 10px;
    font-size: 0.75em;
    line-height: 1.4;
    color: #b3261e;
    background: rgba(179, 38, 30, 0.1);
    padding: 8px 10px;
    border-left: 3px solid #b3261e;
}

.guide-card.has-overflow:not(:hover):not(:focus-within) .card-description {
    display: none;
}

.guide-card .overflow-indicator {
    display: none;
    margin-top: auto;
    text-align: center;
    font-size: 0.7em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9eaaff;
    padding-top: 8px;
    padding-bottom: 6px;
    background: linear-gradient(180deg, rgba(12, 18, 34, 0) 0%, rgba(12, 18, 34, 0.65) 100%);
}

.guide-card.has-overflow:not(:hover):not(:focus-within) .overflow-indicator {
    display: block;
}

.guide-card .category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(118, 75, 162, 0.2);
    border-radius: 20px;
    font-size: 0.8em;
    color: #764ba2;
    margin-bottom: 0;
    margin-top: 0;
}

.guide-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.guide-card .tag {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.75em;
    color: #ccc;
}

/* Card type specific styles */
.guide-card.featured {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(218, 165, 32, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.guide-card.featured h3 {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.green-card {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.15) 0%, rgba(0, 100, 0, 0.15) 100%);
    border: 2px solid rgba(34, 139, 34, 0.5);
    box-shadow: 0 0 30px rgba(34, 139, 34, 0.2);
}

.guide-card.green-card h3 {
    background: linear-gradient(135deg, #228B22 0%, #006400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.white-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(200, 200, 200, 0.12) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.guide-card.white-card h3 {
    background: linear-gradient(135deg, #E0E0E0 0%, #B0B0B0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.black-card {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.2) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 2px solid rgba(100, 100, 100, 0.6);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.guide-card.black-card h3 {
    background: linear-gradient(135deg, #999999 0%, #666666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.red-card {
    background: linear-gradient(135deg, rgba(220, 20, 20, 0.15) 0%, rgba(139, 0, 0, 0.15) 100%);
    border: 2px solid rgba(220, 20, 20, 0.6);
    box-shadow: 0 0 30px rgba(220, 20, 20, 0.3);
}

.guide-card.red-card h3 {
    background: linear-gradient(135deg, #DC1414 0%, #8B0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.pink-card {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.15) 0%, rgba(255, 20, 147, 0.15) 100%);
    border: 2px solid rgba(255, 105, 180, 0.6);
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.2);
}

.guide-card.pink-card h3 {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-card.blue-card {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.15) 0%, rgba(0, 100, 200, 0.15) 100%);
    border: 2px solid rgba(30, 144, 255, 0.5);
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.2);
}

.guide-card.blue-card h3 {
    background: linear-gradient(135deg, #1E90FF 0%, #0064C8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Guide display styles */
.guide-display {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    padding: var(--content-padding-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.guide-display.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step {
    margin-bottom: 50px;
    padding: var(--content-padding-xl);
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #667eea;
    border-radius: 10px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.step h2 {
    color: #667eea;
    font-size: var(--heading-h2-xl);
    margin-bottom: 15px;
    margin-top: 10px;
}

.step h3 {
    color: #8899ea;
    font-size: var(--heading-h3-xl);
}

.step p {
    margin-bottom: 15px;
    color: #d0d0d0;
}

.concept {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: var(--content-padding-xl);
    margin: 20px 0;
}

.concept-title {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.concept-title::before {
    content: '●';
    margin-right: 10px;
    font-size: 1.5em;
}

.example {
    background: rgba(118, 75, 162, 0.1);
    border-left: 4px solid #764ba2;
    padding: var(--content-padding-xl);
    margin: 20px 0;
    border-radius: 5px;
}

.example-title {
    color: #764ba2;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 10px;
}

.key-insight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    padding: var(--content-padding-xl);
    margin: 30px 0;
    position: relative;
}

.key-insight::before {
    content: '💡';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 2em;
    background: #1a1a2e;
    padding: 5px 10px;
    border-radius: 50%;
    z-index: -1;
}

.key-insight-title {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 10px;
    margin-top: 10px;
}

.connection {
    color: #a0a0a0;
    font-style: italic;
    padding: var(--content-padding-xl);
    margin: 20px 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    z-index: 1000;
}

ul, ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 10px;
    color: #d0d0d0;
}

strong {
    color: #667eea;
}

em {
    color: #8899ea;
}

.back-to-selection {
    display: inline-block;
    margin-bottom: 30px;
    padding: 12px 25px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-to-selection:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: translateX(-5px);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.2em;
}

h1 {
    font-size: var(--heading-h1-xl);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-size: var(--heading-h2-xl);
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 20px;
}

h3 {
    font-size: var(--heading-h3-xl);
    font-weight: 600;
    margin-bottom: var(--content-padding-xl);
    margin-top: var(--content-padding-xl);
}

h4 {
    font-size: var(--heading-h4-xl);
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 12px;
}

/* Hamburger menu styles */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10010;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s ease;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 3px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.side-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.side-menu-overlay.active {
    opacity: 1;
    display: block;
}

.side-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: #0f0f1e;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    border-right: 2px solid rgba(102, 126, 234, 0.3);
}

.side-menu.active {
    transform: translateX(0);
    display: block;
}

.side-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.side-menu-header {
    margin-bottom: 20px;
}

.side-menu-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    visibility: visible;
    opacity: 1;
}

.side-menu-controls .search-box,
.side-menu-controls .category-filter,
.side-menu-controls .card-type-filter {
    width: 100%;
}

/* ============================================
   BREAKPOINT: 1800px
   ============================================ */

@media (max-width: 1800px) {
    .header-title-section .subtext-quote:nth-of-type(3),
    .header-title-section .subtext-quote:nth-of-type(4) {
        display: none;
    }
}

/* ============================================
   BREAKPOINT: 1400px
   ============================================ */

@media (max-width: 1400px) {
    .header-title-section .subtext-quote {
        display: none;
    }
    
    header > p,
    header > div:not(.header-container) > p,
    header > div:not(.header-container) p {
        display: none;
    }
    
    body {
        font-size: var(--base-font-size-large);
    }
    
    .guide-display {
        padding: var(--content-padding-large);
    }
    
    .step {
        padding: var(--content-padding-large);
    }
    
    .example,
    .concept,
    .key-insight,
    .connection {
        padding: var(--content-padding-large);
    }
    
    h1 {
        font-size: var(--heading-h1-large);
    }
    
    h2,
    .step h2 {
        font-size: var(--heading-h2-large);
    }
    
    h3,
    .step h3 {
        font-size: var(--heading-h3-large);
        margin-bottom: var(--content-padding-large);
        margin-top: var(--content-padding-large);
    }
    
    h4 {
        font-size: var(--heading-h4-large);
    }
    
    .guide-card .scroll-wrapper {
        padding: var(--content-padding-large);
    }
    
    .guide-card .category {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .guide-card h3 {
        margin-bottom: 0;
        margin-top: 0;
    }
}

/* ============================================
   BREAKPOINT: 1080px
   ============================================ */

@media (max-width: 1080px) {
    body {
        font-size: var(--base-font-size-medium);
    }
    
    .container > header {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .container > header .header-container {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: 1fr;
        gap: 8px;
        height: 60px;
    }
    
    .featured-card-link {
        grid-row: 1 !important;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0;
        padding: 0;
        text-align: center;
        border-radius: 8px;
        height: 100%;
        line-height: 60px;
    }
    
    .header-title-section h1,
    .header-title-section .subtitle,
    .header-title-section .subtext-quote,
    .header-title-section p {
        display: none;
    }
    
    .header-title-section {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2em;
        padding: 0;
        grid-column: 3;
        grid-row: 1;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(218, 165, 32, 0.2) 100%);
        border: 2px solid rgba(255, 215, 0, 0.5);
        border-radius: 8px;
    }
    
    .header-title-section::before {
        content: "✦";
        color: #FFD700;
    }
    
    .white-card-link {
        grid-column: 1;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .white-card-link::after {
        content: "◇";
        font-size: 1.8rem;
        color: #fff;
    }
    
    .black-card-link {
        grid-column: 2;
        background: rgba(0, 0, 0, 0.3);
        border: 2px solid rgba(100, 100, 100, 0.5);
    }
    
    .black-card-link::after {
        content: "◆";
        font-size: 1.8rem;
        color: #888;
    }
    
    .green-card-link {
        grid-column: 4;
        background: rgba(76, 175, 80, 0.2);
        border: 2px solid rgba(76, 175, 80, 0.5);
    }
    
    .green-card-link::after {
        content: "🌿";
        font-size: 1.8rem;
    }
    
    .red-card-link {
        grid-column: 5;
        background: rgba(179, 38, 30, 0.2);
        border: 2px solid rgba(179, 38, 30, 0.5);
    }
    
    .red-card-link::after {
        content: "⚠";
        font-size: 1.8rem;
        color: #b3261e;
    }
    
    header > p,
    header > div:not(.header-container) {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .container .controls,
    .container > .controls {
        display: none;
    }
    
    .side-menu-header {
        display: none;
    }
    
    .guide-display {
        padding: var(--content-padding-medium);
    }
    
    .step {
        padding: var(--content-padding-medium);
    }
    
    .example,
    .concept,
    .key-insight,
    .connection {
        padding: var(--content-padding-medium);
    }
    
    h1 {
        font-size: var(--heading-h1-medium);
    }
    
    h2,
    .step h2 {
        font-size: var(--heading-h2-medium);
    }
    
    h3,
    .step h3 {
        font-size: var(--heading-h3-medium);
        margin-bottom: var(--content-padding-medium);
        margin-top: var(--content-padding-medium);
    }
    
    h4 {
        font-size: var(--heading-h4-medium);
    }
    
    .guide-card .scroll-wrapper {
        padding: var(--content-padding-medium);
    }
    
    .guide-card .category {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .guide-card h3 {
        margin-bottom: 0;
        margin-top: 0;
    }
}

/* ============================================
   BREAKPOINT: 700px
   ============================================ */

@media (max-width: 700px) {
    body {
        padding: 8px;
        font-size: var(--base-font-size-small);
    }
    
    .container {
        width: 100%;
    }
    
    header {
        padding: 8px 6px;
        margin-bottom: 12px;
    }
    
    .header-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto auto auto !important;
        gap: 6px !important;
        height: auto !important;
    }
    
    .header-title-section {
        grid-column: 1 !important;
        grid-row: 3 !important;
        width: 100%;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        line-height: normal;
    }
    
    .header-title-section .subtitle,
    .header-title-section p.subtitle,
    body > div.container > header > div.header-container > div > p.subtitle,
    .header-title-section .subtext-quote,
    .header-title-section p.subtext-quote {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .header-title-section h1 {
        font-size: clamp(1.2em, 5vw + 0.5em, 2.2em);
        margin-bottom: 0;
        width: 100%;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    body > div.container > header > p,
    header > p,
    header > div:not(.header-container) > p,
    header > div:not(.header-container) p,
    header > div[style*="text-align"] p,
    header > div[style*="margin-top"] p {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .featured-card-link {
        width: 100% !important;
        grid-column: 1 !important;
        font-size: 0.9em;
        padding: 8px 12px;
        white-space: normal;
        display: block;
        min-height: 44px;
        line-height: normal;
    }
    
    .featured-card-link::after {
        content: none !important;
    }
    
    .featured-card-link:nth-of-type(1) { grid-row: 1 !important; }
    .featured-card-link:nth-of-type(2) { grid-row: 2 !important; }
    .featured-card-link:nth-of-type(3) { grid-row: 4 !important; }
    .featured-card-link:nth-of-type(4) { grid-row: 5 !important; }
    
    .guide-grid {
        grid-template-columns: 1fr;
    }
    
    .container .controls,
    .container > .controls,
    div.controls:not(.side-menu-controls) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .hamburger-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .side-menu-controls,
    .side-menu .controls {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .side-menu-header {
        display: none !important;
    }
    
    .container > header {
        display: block !important;
    }
    
    .guide-card {
        height: auto;
        min-height: 44px;
    }
    
    .guide-card .scroll-wrapper {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: var(--content-padding-small);
    }
    
    .guide-card .card-content {
        width: 100%;
    }
    
    .guide-card .category {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .featured-card-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .guide-display {
        padding: var(--content-padding-small);
    }
    
    .step {
        padding: var(--content-padding-small);
    }
    
    .example,
    .concept,
    .key-insight,
    .connection {
        padding: var(--content-padding-small);
    }
    
    h1 {
        font-size: var(--heading-h1-small);
    }
    
    h2,
    .step h2 {
        font-size: var(--heading-h2-small);
    }
    
    h3,
    .step h3 {
        font-size: var(--heading-h3-small);
        margin-bottom: var(--content-padding-small);
        margin-top: var(--content-padding-small);
    }
    
    h4 {
        font-size: var(--heading-h4-small);
    }
    
    .guide-card h3 {
        margin-bottom: 0;
        margin-top: 0;
    }
}

/* ============================================
   BREAKPOINT: 550px
   ============================================ */

@media (max-width: 550px) {
    body {
        padding: 4px;
        font-size: var(--base-font-size-tiny);
    }
    
    .container {
        width: 100%;
    }
    
    header {
        padding: 4px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    
    .header-container {
        gap: 4px;
    }
    
    .header-title-section {
        padding: 8px 12px;
        min-height: 44px;
        line-height: 0.8;
    }
    
    .header-title-section h1 {
        font-size: clamp(1em, 4vw + 0.3em, 1.8em);
        margin-bottom: 0;
        line-height: 0.8;
    }
    
    .featured-card-link {
        padding: 8px 12px;
        font-size: 0.8em;
        min-height: 44px;
        display: flex;
        align-items: center;
        line-height: normal;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .guide-card {
        height: auto;
        min-height: 44px;
        padding: 0;
        margin-bottom: 0;
    }
    
    .guide-card .scroll-wrapper {
        padding: var(--content-padding-tiny);
        min-height: 44px;
        height: auto;
        display: flex;
        align-items: center;
    }
    
    .guide-card .card-content {
        width: 100%;
    }
    
    .guide-card .card-description,
    .guide-card .tags,
    .guide-card .category,
    .guide-card .overflow-indicator {
        display: none !important;
    }
    
    .guide-card h3 {
        font-size: 1em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        margin-bottom: 11px;
        margin-top: 11px;
        margin-left: 10px;
    }
    
    .guide-display {
        padding: var(--content-padding-tiny);
    }
    
    .step {
        padding: var(--content-padding-tiny);
        margin-bottom: 20px;
    }
    
    .example,
    .concept,
    .key-insight,
    .connection {
        padding: var(--content-padding-tiny);
    }
    
    h1 {
        font-size: var(--heading-h1-tiny);
    }
    
    h2,
    .step h2 {
        font-size: var(--heading-h2-tiny);
    }
    
    h3,
    .step h3 {
        font-size: var(--heading-h3-tiny);
        margin-bottom: var(--content-padding-tiny);
        margin-top: var(--content-padding-tiny);
    }
    
    h4 {
        font-size: var(--heading-h4-tiny);
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 1em;
    }
    
    .back-to-selection {
        width: 100%;
        text-align: center;
        padding: 10px 12px;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION HANDLING
   Apply 1080-1400 layout for landscape phones
   ============================================ */

@media (orientation: landscape) and (max-width: 1400px) and (max-height: 600px) {
    body {
        font-size: var(--base-font-size-large);
    }
    
    .guide-display {
        padding: var(--content-padding-large);
    }
    
    .step {
        padding: var(--content-padding-large);
    }
    
    .example,
    .concept,
    .key-insight,
    .connection {
        padding: var(--content-padding-large);
    }
    
    h1 {
        font-size: var(--heading-h1-large);
    }
    
    h2,
    .step h2 {
        font-size: var(--heading-h2-large);
    }
    
    h3,
    .step h3 {
        font-size: var(--heading-h3-large);
        margin-bottom: var(--content-padding-large);
        margin-top: var(--content-padding-large);
    }
    
    h4 {
        font-size: var(--heading-h4-large);
    }
    
    .guide-card .scroll-wrapper {
        padding: var(--content-padding-large);
    }
    
    .guide-card .category {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .guide-card h3 {
        margin-bottom: 0;
        margin-top: 0;
    }
}
