/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-ink: #0a0f0d;
    --color-ink-light: #1a1f1d;
    --color-sage: #3B7D69;
    --color-sage-light: #226551;
    --color-sage-dark: #0F4C3A;
    --color-sage-highlight: rgba(59, 125, 105, 0.08);
    --color-mist: #f9faf9;
    --color-fog: #fefefe;
    --color-glass: rgba(249, 250, 249, 0.92);
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    
    /* Spacing */
    --space-1: 0.125rem;
    --space-2: 0.25rem;
    --space-3: 0.5rem;
    --space-5: 0.8125rem;
    --space-8: 1.3125rem;
    --space-13: 2.125rem;
    --space-21: 3.4375rem;
    --space-34: 5.5625rem;
    --space-55: 9rem;
    
    /* Fonts */
    --font-display: 'Instrument Serif', 'Crimson Text', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.875;
    
    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
}

/* Hide default browser scrollbar but keep custom indicator */
html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Base Typography */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: #1a1a1a;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background-color: var(--color-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(10, 15, 13, 0.08) 20%, 
        rgba(10, 15, 13, 0.08) 80%, 
        transparent);
}

.header-container {
    max-width: 42rem;
    margin: 0 auto;
    padding: var(--space-2) var(--space-13);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand h1 {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--color-sage-dark);
    letter-spacing: var(--tracking-tight);
    line-height: 1;
    margin: 0;
}

.site-author {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-sage-dark);
    letter-spacing: var(--tracking-wide);
    margin: 0;
    line-height: 1.2;
}

/* Hero Section */
.hero {
    margin-top: var(--space-8);
    margin-bottom: var(--space-34);
    position: relative;
    z-index: 200;  /* Above fade overlays to stay visible */
}

.hero-image {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 var(--space-13);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--space-2);
    box-shadow: 0 2px 8px rgba(10, 15, 13, 0.08);
    border: 2px solid var(--color-sage);
}

/* Content */
.content {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 var(--space-13) var(--space-55);
}

.content-section {
    margin-bottom: 0;
}

/* Headings */
.content h1 {
    font-family: var(--font-body);
    font-size: 0.92rem; /* Word size 11 = ~14.7px = ~0.92rem */
    font-weight: 600;
    color: var(--color-sage-dark); /* #0F4C3A */
    margin-bottom: 0;
    margin-top: 1rem; /* Just a new line space before */
    letter-spacing: var(--tracking-normal);
    text-transform: none; /* No capitals */
    line-height: 1.5; /* Word 1.5 spacing */
}

.content h2 {
    font-family: var(--font-body);
    font-size: 0.75rem; /* Word size 9 = 12px = 0.75rem */
    font-weight: 700; /* Bold like Word */
    color: var(--color-sage-dark); /* #0F4C3A */
    margin-bottom: 0;
    margin-top: 1rem; /* Just a new line space before */
    letter-spacing: var(--tracking-normal);
    text-transform: none; /* No capitals */
    line-height: 1.5; /* Word 1.5 spacing */
}

/* h3 - Same style as h2 but not in navigation */
.content h3 {
    font-family: var(--font-body);
    font-size: 0.75rem; /* Word size 9 = 12px = 0.75rem */
    font-weight: 700; /* Bold like Word */
    color: var(--color-sage-dark); /* #0F4C3A */
    margin-bottom: 0;
    margin-top: 1rem; /* Just a new line space before */
    letter-spacing: var(--tracking-normal);
    text-transform: none; /* No capitals */
    line-height: 1.5; /* Word 1.5 spacing */
}

/* Paragraphs */
.content p {
    margin-bottom: 2rem; /* 2rem space after each paragraph */
    margin-top: 0;
    font-size: 0.92rem; /* Word size 11 = ~14.7px = ~0.92rem */
    line-height: 2; /* Double spacing within paragraphs */
    letter-spacing: var(--tracking-normal);
    font-weight: 400; /* Normal weight - same as before */
}

/* Lead paragraph - same as regular now */
.content p:first-of-type {
    font-size: 0.92rem;
}

/* Lists */
.content ul,
.content ol {
    margin-bottom: 2rem; /* Same spacing as paragraphs */
    margin-top: 0;
    padding-left: 2rem; /* Indent for bullets/numbers */
    font-size: 0.92rem; /* Same as paragraph text */
    line-height: 2; /* Same line height as paragraphs */
    letter-spacing: var(--tracking-normal);
    font-weight: 400;
}

.content li {
    margin-bottom: 0.5rem; /* Space between list items */
    padding-left: 0.25rem; /* Small padding after bullet */
}

.content ul {
    list-style-type: disc;
}

.content ol {
    list-style-type: decimal;
}

/* Nested lists */
.content ul ul,
.content ol ol,
.content ul ol,
.content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Navigation Icons */
.header-nav {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.nav-button {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-3);
    color: var(--color-sage-dark);
    transition: all 150ms ease-out;
    border-radius: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    color: var(--color-sage-dark);
    background-color: var(--color-sage-highlight);
}

.nav-button svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.5;
}

/* Fade Effects - Default Mode */
.fade-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 15vh;
    background: linear-gradient(to bottom, var(--color-mist) 0%, var(--color-mist) 50%, rgba(249, 250, 249, 0.9) 80%, transparent 100%);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.fade-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45vh;
    background: linear-gradient(to top, var(--color-mist) 0%, var(--color-mist) 15%, rgba(249, 250, 249, 0.95) 35%, rgba(249, 250, 249, 0.7) 60%, transparent 100%);
    pointer-events: none;
    z-index: 100;
}

/* Pre-fade blur effect */
.fade-bottom::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25vh;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    mask: linear-gradient(to top, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 1) 10%, 
        rgba(0, 0, 0, 0.9) 30%, 
        rgba(0, 0, 0, 0.5) 60%, 
        transparent 100%);
    -webkit-mask: linear-gradient(to top, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 1) 10%, 
        rgba(0, 0, 0, 0.9) 30%, 
        rgba(0, 0, 0, 0.5) 60%, 
        transparent 100%);
}

/* Focus Mode */
body.focus-mode .fade-top,
body.focus-mode .fade-bottom {
    display: none !important;
}

body.focus-mode p,
body.focus-mode h1,
body.focus-mode h2 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    top: 42px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    max-width: 42rem;
    width: 100%;
    padding: 0 var(--space-13);
    z-index: 999;
    transition: transform 250ms ease-out, visibility 0s 250ms;
    pointer-events: none;
    visibility: hidden;
}

.accessibility-panel.visible {
    transform: translateX(-50%) translateY(-2px);
    pointer-events: auto;
    visibility: visible;
    transition: transform 250ms ease-out, visibility 0s;
}

.accessibility-panel-inner {
    display: flex;
    justify-content: flex-end;
}

.accessibility-panel-content {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: var(--color-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 125, 105, 0.1);
    border-top: none;
}

/* Font buttons */
.font-button {
    width: 1.5rem;
    height: 1.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--color-sage-dark);
    color: var(--color-sage-dark);
    cursor: pointer;
    transition: all 150ms ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--space-1);
}

.font-button:hover,
.font-button:focus,
.font-button:active {
    background-color: var(--color-sage-dark);
    color: white;
}

/* Better touch handling for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .font-button:active {
        background-color: var(--color-sage-dark);
        color: white;
        transform: scale(0.95);
    }
}

.font-button svg {
    width: 12px;
    height: 12px;
    pointer-events: none;
}


/* Highlight focus button when active (when in fade mode) */
body:not(.focus-mode) .focus-toggle {
    background-color: var(--color-sage-dark) !important;
    color: white !important;
}

/* Highlight reading time button when active */
.reading-time-toggle.active {
    background-color: var(--color-sage-dark) !important;
    color: white !important;
}


/* Bottom Reading Time - Simple and Clean */
.bottom-reading-time {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: var(--space-3) var(--space-8);
    text-align: center;
    border-top: 1px solid rgba(59, 125, 105, 0.15);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--color-sage-dark);
    letter-spacing: var(--tracking-wide);
    z-index: 1000;
    transition: all 150ms ease-out;
}

#timeRemaining {
    font-weight: 600;
}

/* Close button - appears on hover */
.reading-time-close {
    position: absolute;
    top: 50%;
    right: var(--space-5);
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-sage-dark);
    font-size: var(--text-lg);
    font-weight: 300;
    cursor: pointer;
    opacity: 0;
    transition: all 150ms ease-out;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--space-1);
    line-height: 1;
}

.bottom-reading-time:hover .reading-time-close {
    opacity: 0.6;
}

.reading-time-close:hover {
    opacity: 1 !important;
    background-color: var(--color-sage-highlight);
    color: var(--color-sage-dark);
}

/* Reading time is now independent of view mode - users can toggle it on/off regardless */

/* Brief message when reading time is dismissed */
.reading-time-message {
    position: fixed;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--color-sage-dark);
    border: 1px solid rgba(59, 125, 105, 0.15);
    z-index: 1001;
    opacity: 0;
    transition: opacity 300ms ease-out;
    pointer-events: none;
}

.reading-time-message.visible {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 48rem) {
    .reading-time-close {
        right: var(--space-3);
        width: 2rem;
        height: 2rem;
        font-size: var(--text-xl);
    }
    
    .bottom-reading-time:hover .reading-time-close {
        opacity: 0.8; /* More visible on mobile since hover is less reliable */
    }
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    right: -20rem;
    width: 20rem;
    height: 100vh;
    background-color: var(--color-fog);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 250ms ease-out;
    z-index: 1200;
    overflow-y: auto;
}

.nav-menu.open {
    right: 0;
}

.nav-menu-inner {
    padding: var(--space-13);
}

.nav-close {
    position: absolute;
    top: var(--space-8);
    right: var(--space-8);
    background: transparent;
    border: none;
    font-size: var(--text-2xl);
    color: var(--color-sage-dark);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-close:hover {
    opacity: 0.7;
}

.nav-links {
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: block;
    padding: var(--space-3) var(--space-8);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
    font-weight: 400;
    border-radius: var(--space-2);
    transition: all var(--duration-base) var(--ease-out);
    cursor: pointer;
}

/* H1 navigation links */
.nav-link.nav-h1 {
    font-weight: 500;
    margin-top: var(--space-3);
    margin-bottom: var(--space-1);
}

/* H2 navigation links - indented */
.nav-link.nav-h2 {
    font-weight: 400;
    padding-left: calc(var(--space-8) + var(--space-3));
    font-size: 0.8125rem; /* Slightly smaller */
    margin-top: 0;
}

/* Reading progress colors - matching that perfect original look */
.nav-link[data-reading-level="0"] { 
    color: rgba(10, 15, 13, 0.03); /* Back to 3% - was perfect */
}
.nav-link[data-reading-level="1"] { 
    color: rgba(10, 15, 13, 0.12);
}
.nav-link[data-reading-level="2"] { 
    color: rgba(10, 15, 13, 0.18);
}
.nav-link[data-reading-level="3"] { 
    color: rgba(10, 15, 13, 0.25);
}
.nav-link[data-reading-level="4"] { 
    color: rgba(10, 15, 13, 0.35); /* Max darkness at 35% */
}
.nav-link[data-reading-level="5"] { 
    color: rgba(10, 15, 13, 0.35); /* Same as level 4 - not used for h1 */
}
.nav-link[data-reading-level="complete"] { 
    color: var(--color-sage-dark); /* Green when complete (h1 only) */
}

.nav-link:hover {
    background-color: var(--color-sage-highlight);
}

/* Current section highlighting */
.nav-link.current-section {
    border: 1px solid rgba(59, 125, 105, 0.2);
    border-radius: var(--space-2);
    color: var(--color-ink) !important; /* Darkest text for readability */
}

/* Custom Scroll Indicator - Hidden in fade mode */
.scroll-indicator {
    position: fixed;
    right: var(--space-5);
    top: 0; /* JavaScript will handle positioning */
    width: 4px;
    height: 80px;
    background-color: var(--color-sage-dark);
    border-radius: 2px;
    transform-origin: center;
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-out), top var(--duration-fast) var(--ease-out);
    z-index: 1001;
    pointer-events: none;
    cursor: pointer;
    display: none; /* Hidden by default in fade mode */
}

/* Show scroll indicator only in focus mode */
body.focus-mode .scroll-indicator {
    display: block;
}

.scroll-indicator.visible {
    opacity: 0.6;
    transform: translateY(-50%);
    pointer-events: auto;
}

.scroll-indicator.scrolling {
    opacity: 0.9;
    transition: none !important;
}

.scroll-indicator:hover {
    opacity: 1;
    cursor: grab;
}

.scroll-indicator:active,
.scroll-indicator.dragging {
    opacity: 1;
    cursor: grabbing;
}

/* Prevent text selection while dragging */
body.dragging-scroll {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 250ms ease-out;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Collapsible Sections */
.collapsible-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    margin-left: 0;
    padding-left: 0;
}

.collapsible-heading .heading-text {
    flex: 1;
    cursor: text;
}

.collapse-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 200ms ease;
    color: var(--color-sage-dark);
}

.collapse-toggle:hover {
    opacity: 0.7;
}

.collapse-icon {
    width: 20px;
    height: 20px;
    transition: transform 200ms ease;
}

.collapsible-heading.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: visible;
    transition: max-height 300ms ease, opacity 200ms ease;
    max-height: 100000px;
    opacity: 1;
    font-size: var(--text-base) !important;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    overflow: hidden;
}

/* Help Modal */
.help-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1200;
}

.help-modal.active {
    display: block;
}

.help-modal-inner {
    background-color: var(--color-fog);
    width: 28rem;
    max-height: 60vh;
    border-radius: var(--space-3);
    padding: var(--space-13);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(10, 15, 13, 0.12);
    border: 1px solid rgba(15, 76, 58, 0.1);
}

/* Help sections styling */
.help-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.help-section {
    padding: var(--space-3) 0;
    transition: all var(--duration-base) var(--ease-out);
}

/* Help section text styling - smaller fonts like original */
.help-section h2,
.help-section h3 {
    color: var(--color-sage-dark);
    font-weight: 600;
    font-size: var(--text-base);  /* 16px for headings */
    margin-bottom: var(--space-2);
}

.help-section p,
.help-sections p {
    font-size: var(--text-sm);  /* 14px - smaller like original */
    line-height: var(--leading-normal);
    color: var(--color-sage-dark);
    margin-bottom: var(--space-2);
}

/* Style bullet points in help modal */
.help-sections ul,
.help-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.help-sections li,
.help-section li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);  /* 14px */
    line-height: var(--leading-normal);
    color: var(--color-sage-dark);
}

.help-sections li::before,
.help-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-sage-dark);
    font-weight: 600;
}

.help-section.locked {
    opacity: 0.5;
    position: relative;
}

.help-section.locked h2 {
    color: var(--color-sage-dark);
    opacity: 0.6;
}

.help-section.current-section {
    background: rgba(59, 125, 105, 0.04);
}

.lock-icon {
    width: 14px;
    height: 14px;
    color: var(--color-sage-dark);
    opacity: 0.6;
    vertical-align: middle;
}

.lock-icon-right {
    float: right;
    margin-top: 2px;
}


/* Mobile help modal improvements */
@media (max-width: 48rem) {
    .help-modal {
        width: 90%;
        max-width: 24rem;
    }
    
    .help-modal-inner {
        width: 100%;
        max-height: 70vh;
        padding: var(--space-8);
    }
}

/* Mobile Responsive */
@media (max-width: 48rem) {
    .header-container,
    .hero-image,
    .content {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
    
    .accessibility-panel {
        padding: 0 var(--space-8);
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
}

/* Notes Feature Styling - Exact copy from main */
/* Highlight notes button when active */
body.notes-mode .notes-toggle {
    background-color: var(--color-sage);
    color: white;
}

/* Notes Feature Styling */
.paragraph-notes-container {
    position: absolute;
    top: 0.5rem;
    right: -2rem;
    width: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    max-height: 15rem;
    flex-wrap: wrap;
    align-content: flex-start;
    opacity: 0.7;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.paragraph-notes-container:hover {
    opacity: 1;
}

/* Left margin notes container for imported notes */
.paragraph-notes-container.left-margin {
    right: auto;
    left: -2rem;
    display: none; /* Hidden by default */
}

/* Only show when has-notes class is added */
.paragraph-notes-container.left-margin.has-notes {
    display: flex;
}

/* Symmetric positioning for both sides */
.paragraph-notes-container[data-side="left"] {
    right: auto;
    left: -2rem;
    display: flex;
}

.paragraph-notes-container[data-side="right"] {
    left: auto;
    right: -2rem;
    display: flex;
}

/* Multi-column overflow support */
.paragraph-notes-container.has-many-notes {
    width: 2.5rem; /* Wider when there are many notes to accommodate columns */
}

.paragraph-notes-container.has-many-notes .note-item,
.paragraph-notes-container.has-many-notes .note-add-button {
    align-self: center; /* Center items within each column */
}

/* Delete button for imported notes */
.note-delete {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 0.875rem;
    height: 0.875rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--duration-fast) var(--ease-out);
    z-index: 1;
    font-size: 0.5rem;
}

.note-item.imported:hover .note-delete {
    opacity: 1;
}

.note-delete:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.note-delete svg {
    width: 0.6rem;
    height: 0.6rem;
}

/* Show notes container only in notes mode - handled by rule at bottom */

.note-add-button {
    width: 1.25rem;
    height: 1.25rem;
    background: transparent;
    color: var(--color-sage);
    border: none;
    border-radius: 0;
    font-size: var(--text-lg);
    font-weight: 300;
    cursor: pointer;
    display: none; /* Hidden by default, shown only in notes mode */
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: all var(--duration-fast) var(--ease-out);
    line-height: 1;
    margin-bottom: var(--space-1);
    flex-shrink: 0; /* Prevent shrinking */
}

.note-add-button:hover {
    opacity: 0.7;
    transform: none;
}

/* Note item container */
.note-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-1);
    height: 1.25rem;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Delete button for notes */
.note-delete {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 0.875rem;
    height: 0.875rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--duration-fast) var(--ease-out);
    z-index: 1;
}

.note-item:hover .note-delete {
    opacity: 1;
}

.note-delete:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

.note-delete svg {
    width: 0.625rem;
    height: 0.625rem;
    stroke-width: 2.5;
}

/* Note circle for existing notes */
.note-circle {
    width: 1.25rem;
    height: 1.25rem;
    border: none;
    border-radius: 50%;
    background-color: #f0d9ef;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    color: var(--color-ink);
    transition: all var(--duration-fast) var(--ease-out);
    opacity: 0.9;
    flex-shrink: 0; /* Prevent shrinking */
}

.note-circle:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Note input container */
.note-input-container {
    display: inline-block;
    width: auto;
    max-width: 42rem;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 20;
    clear: none;
}

/* Color picker - below input */
.note-color-picker {
    display: flex;
    gap: var(--space-2);
    padding: 0;
    background: transparent;
    margin-top: var(--space-2);
    margin-bottom: var(--space-1);
}

.color-option {
    width: 1.25rem;
    height: 1.25rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
}

.color-option.selected {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.color-option.selected::after {
    content: '•';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Compact edit view for existing notes */
.note-edit-container {
    margin-top: 0;
    margin-bottom: 0;
    padding: var(--space-3) 2.5rem var(--space-3) var(--space-5);
    border-radius: var(--space-1);
    position: relative;
    background-color: #f0d9ef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    width: auto;
    max-width: 100%;
}

.note-edit-text {
    color: var(--color-ink-light);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    margin: 0;
    padding: 0;
    min-height: 1.5rem;
}

.note-edit-button {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 1.125rem;
    height: 1.125rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
    color: var(--color-ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.note-edit-button:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.note-edit-button svg {
    width: 0.625rem;
    height: 0.625rem;
    stroke-width: 2;
}

.note-move-button {
    position: absolute;
    top: calc(var(--space-2) + 1.25rem);
    right: var(--space-2);
    width: 1.125rem;
    height: 1.125rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.note-move-button:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.note-delete-button {
    position: absolute;
    top: calc(var(--space-2) + 2rem);
    right: var(--space-2);
    width: 1.125rem;
    height: 1.125rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
    color: var(--color-ink);
    font-size: 0.625rem;
}

.note-delete-button:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Note input textarea - sleek modern design */
.note-input {
    width: 100%;
    min-height: 5rem;
    padding: var(--space-5);
    border: 1.5px solid var(--color-sage);
    border-radius: var(--space-2);
    background: white;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-ink-light);
    resize: none;
    outline: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.note-input:focus {
    border-color: var(--color-sage-dark);
    border-width: 1.5px;
    outline: none;
}

.note-input::placeholder {
    display: none; /* No placeholder text as requested */
}

/* Mobile adjustments for notes */
@media (max-width: 48rem) {
    /* Add generous padding to content when notes mode is active */
    body.notes-mode .content {
        padding-left: var(--space-21);
        padding-right: var(--space-21);
    }
    
    body.notes-mode .content-section {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
    
    .paragraph-notes-container {
        right: calc(var(--space-8) * -1);
        width: 1.5rem;
        max-height: 18rem; /* Taller on mobile before column overflow */
    }
    
    .paragraph-notes-container.left-margin {
        left: calc(var(--space-8) * -1);
        width: 1.5rem;
    }
    
    .paragraph-notes-container.has-many-notes {
        width: 3rem; /* Even wider on mobile for columns */
    }
    
    .note-add-button {
        width: 1.5rem;
        height: 1.5rem;
        font-size: var(--text-xl);
    }
    
    .note-circle {
        width: 1.5rem;
        height: 1.5rem;
        font-size: var(--text-sm);
    }
    
    .note-item {
        height: 1.5rem;
    }
    
    .note-delete {
        width: 1rem;
        height: 1rem;
        top: -0.6rem;
        right: -0.8rem; /* Move further away to avoid accidental clicks */
    }
    
    .note-delete svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .note-input {
        font-size: var(--text-base);
        padding: var(--space-3);
        min-height: 4rem;
    }
    
    .note-color-picker {
        padding: 0;
        gap: var(--space-2);
    }
}

/* Notes are always visible when notes mode is active, regardless of focus mode */
body.notes-mode p {
    position: relative;
}

body.notes-mode .paragraph-notes-container {
    display: flex !important;
}

/* Ensure add buttons are visible in notes mode */
body.notes-mode .note-add-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Only hide notes when notes mode is completely off */
body:not(.notes-mode) .paragraph-notes-container,
body:not(.notes-mode) .note-input-container {
    display: none !important;
}


/* Transfer Modal Styles */
.transfer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.transfer-modal.active {
    display: flex;
}

.transfer-modal-inner {
    background: white;
    border-radius: 16px;
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--color-sage);
}

.transfer-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-5);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-ink-light);
    line-height: 1;
    padding: var(--space-2);
    border-radius: 4px;
    z-index: 10;
}

.transfer-close:hover {
    background: #f0f0f0;
}

.transfer-content {
    text-align: center;
    padding: var(--space-4) 0;
}

.transfer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: 0 var(--space-13);
    position: relative;
}

.transfer-title {
    font-size: var(--text-xl);
    font-weight: 500;
    margin: 0;
    color: var(--color-ink);
}

.info-icon {
    background: var(--color-sage-highlight);
    color: var(--color-sage-dark);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
}

.custom-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    border-radius: 16px;
}

.custom-tooltip.active {
    display: flex;
}

.tooltip-content {
    background: #e8f4f0;  /* Light sage green - solid color */
    color: var(--color-ink);
    padding: var(--space-8);
    padding-top: var(--space-13);
    border-radius: 16px;
    width: 85%;
    height: auto;
    max-height: 85%;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-sage);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.tooltip-content h4 {
    margin: 0 0 var(--space-5) 0;
    color: var(--color-sage-dark);
    font-size: var(--text-lg);
}

.tooltip-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.tooltip-content li {
    padding: var(--space-1) 0;
    padding-left: var(--space-8);
    position: relative;
    line-height: 1.4;
    font-size: 11px;
    text-align: left;
}

.tooltip-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-sage);
    font-weight: bold;
}

.tooltip-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-ink-light);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.tooltip-close:hover {
    color: var(--color-sage-dark);
}

/* Removed hover rule - now handled by JavaScript */

.transfer-button {
    padding: var(--space-5) var(--space-8);
    border: 1px solid rgba(181, 188, 181, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: var(--text-base);
    background: white;
    color: var(--color-ink);
    margin: var(--space-2);
}

.transfer-button:hover {
    background: #f8f9fa;
    border-color: var(--color-sage);
}

.transfer-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.transfer-button.cancel {
    background: var(--color-ink-light);
    color: white;
}

/* Transfer Code Display */
.transfer-methods {
    display: flex;
    gap: var(--space-5);
    align-items: center;
    justify-content: center;
    margin: var(--space-4) 0;
}

.transfer-code-display {
    text-align: center;
    flex: 1;
}

.transfer-qr-section {
    text-align: center;
    flex: 1;
}

.qr-code-container {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-2);
    background: #f8f9fa;
    border: 1px solid var(--color-sage);
    border-radius: var(--space-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-light);
    font-size: var(--text-sm);
}

.qr-label {
    font-size: var(--text-sm);
    color: var(--color-ink-light);
    margin: 0;
}

.code-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.3em;
    color: var(--color-sage);
    background: #f8f9fa;
    padding: var(--space-5);
    border-radius: 4px;
    margin: var(--space-4) 0;
    border: 1px solid rgba(181, 188, 181, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.copy-code-btn {
    background: white;
    color: var(--color-ink);
    border: 1px solid rgba(181, 188, 181, 0.3);
    padding: var(--space-3) var(--space-4);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: var(--space-2);
    font-weight: 400;
}

.copy-code-btn:hover {
    background: #f8f9fa;
    border-color: var(--color-sage);
}

/* Transfer Input */
.transfer-input-section {
    text-align: center;
    margin: var(--space-4) 0;
}

.transfer-code-input {
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: normal;
    padding: var(--space-5) var(--space-8);
    border: 1px solid rgba(181, 188, 181, 0.3);
    border-radius: 4px;
    text-align: center;
    width: 260px;
    margin: var(--space-4) 0;
    background: white;
    box-shadow: none;
}

.transfer-code-input:focus {
    outline: none;
    border-color: var(--color-sage);
}

.transfer-code-input::placeholder {
    font-size: 0.9rem;
    color: var(--color-ink-light);
    opacity: 0.7;
    text-transform: lowercase;
}

/* Transfer Results */
.transfer-result {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border-radius: 4px;
}

.transfer-expiry {
    color: var(--color-ink-light);
    font-size: 0.9rem;
    margin-top: var(--space-2);
}

.refresh-note {
    font-style: italic;
    color: var(--color-ink-light);
}

/* Delete Section */
.delete-section {
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(181, 188, 181, 0.2);
    text-align: center;
}

.delete-button {
    padding: var(--space-3) var(--space-6);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    background: white;
    color: #dc3545;
}

.delete-button:hover {
    background: #fff5f5;
    border-color: #dc3545;
}

/* Import States */
.import-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: var(--space-4);
    border-radius: 4px;
}

.import-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: var(--space-4);
    border-radius: 4px;
}

/* Delete Confirmation */
.delete-confirmation {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: var(--space-4);
    border-radius: 4px;
    margin-top: var(--space-4);
}

.delete-confirmation h4 {
    margin: 0 0 var(--space-3) 0;
    color: #721c24;
}

.delete-confirmation p {
    margin: var(--space-2) 0;
}

.delete-choices {
    margin-top: var(--space-4);
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.transfer-button.danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.transfer-button.danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.delete-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: var(--space-4);
    border-radius: 4px;
    text-align: center;
}

.import-choices {
    margin-top: var(--space-4);
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.transfer-message {
    margin: var(--space-4) 0;
    padding: var(--space-3);
    border-radius: 4px;
    font-size: 0.9rem;
}

.transfer-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.transfer-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.transfer-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .transfer-modal-inner {
        padding: var(--space-6);
        margin: var(--space-3);
        max-width: 360px;
    }
    
    .transfer-methods {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .transfer-code-input {
        width: 100%;
        max-width: 260px;
    }
    
    .import-choices {
        flex-direction: column;
    }
}

/* =====================================================
   Accessibility Info Modal Styles
   ===================================================== */

.accessibility-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.accessibility-info-modal.active {
    display: flex;
}

.accessibility-info-content {
    margin-top: var(--space-5);
}

.accessibility-info-section {
    margin-bottom: var(--space-8);
}

.accessibility-info-section h3 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-sage-dark);
    margin: 0 0 var(--space-3) 0;
    line-height: var(--leading-tight);
}

.accessibility-info-section p {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-ink);
    margin: 0;
}

.accessibility-info-section p strong {
    color: var(--color-sage-dark);
    font-weight: 600;
}

/* Info button styling */
.accessibility-info-toggle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 300 !important;
    font-style: italic;
}

/* Button demonstration styling */
.accessibility-button-demo {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-3);
}

.demo-button {
    pointer-events: none; /* Disable interaction for demo buttons */
    opacity: 0.9;
}

.demo-button svg {
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.button-explanation {
    flex: 1;
}

.button-explanation h3 {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-sage-dark);
    margin: 0 0 var(--space-1) 0;
    line-height: var(--leading-tight);
}

.button-explanation p {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-ink);
    margin: 0;
}

/* =====================================================
   Notes Info Modal Styles
   ===================================================== */

.notes-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.notes-info-modal.active {
    display: flex;
}

.notes-info-content {
    margin-top: var(--space-5);
}

.notes-info-content p {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-ink);
    margin: 0 0 var(--space-3) 0;
}

.notes-info-content p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   Mailing List Styles
   ===================================================== */

/* Mailing List Link */
.mailing-list-link {
    display: inline-block;
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #a4cbb8;
}

.mailing-list-link:hover {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #a4cbb8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 125, 105, 0.2);
}

.mailing-list-link:active {
    transform: translateY(0);
}

/* Mailing List Modal */
.mailing-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-21);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mailing-list-modal.active {
    opacity: 1;
    visibility: visible;
}

.mailing-list-modal-inner {
    background: white;
    border-radius: 16px;
    padding: var(--space-21);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--color-sage);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.mailing-list-modal.active .mailing-list-modal-inner {
    transform: scale(1);
}

.mailing-list-modal-inner h2 {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--color-ink);
    margin: 0 0 var(--space-13) 0;
    line-height: var(--leading-tight);
}

.mailing-list-modal-inner p {
    color: var(--color-ink);
    font-size: var(--text-base);
    margin-bottom: var(--space-8);
    line-height: var(--leading-normal);
}

.mailing-list-form {
    margin-bottom: var(--space-8);
}

.mailing-list-form input[type="email"] {
    width: 100%;
    padding: var(--space-5);
    border: 1px solid var(--color-sage);
    border-radius: 4px;
    font-size: var(--text-base);
    font-family: var(--font-body);
    background: white;
    color: var(--color-ink);
    margin-bottom: var(--space-8);
    transition: border-color 0.2s ease;
}

.mailing-list-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-sage);
    background: var(--color-fog);
}

.mailing-list-form input[type="email"]:invalid {
    border-color: var(--color-sage);
}

.mailing-list-buttons {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.subscribe-btn,
.unsubscribe-btn {
    padding: var(--space-3) var(--space-8);
    border: none;
    border-radius: 4px;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subscribe-btn {
    background: var(--color-sage);
    color: var(--color-fog);
    flex: 1;
}

.subscribe-btn:hover:not(:disabled) {
    background: var(--color-sage-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 125, 105, 0.3);
}

.unsubscribe-btn {
    background: var(--color-mist);
    color: var(--color-ink-light);
    border: 1px solid rgba(59, 125, 105, 0.2);
    flex: 1;
}

.unsubscribe-btn:hover:not(:disabled) {
    background: rgba(59, 125, 105, 0.05);
    border-color: var(--color-sage);
}

.subscribe-btn:disabled,
.unsubscribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    font-size: var(--text-lg);
}

.mailing-list-message {
    padding: var(--space-5);
    border-radius: 4px;
    margin-bottom: var(--space-8);
    display: none;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    border: 1px solid rgba(59, 125, 105, 0.2);
    background: rgba(59, 125, 105, 0.05);
}

.mailing-list-message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.mailing-list-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.mailing-list-message.info {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.privacy-note {
    font-size: var(--text-xs);
    color: rgba(26, 31, 29, 0.6);
    text-align: center;
    margin: 0;
}

.gdpr-notice {
    font-size: var(--text-sm);
    color: rgba(26, 31, 29, 0.7);
    background: rgba(59, 125, 105, 0.05);
    border: 1px solid rgba(59, 125, 105, 0.15);
    border-radius: 6px;
    padding: var(--space-8);
    margin-bottom: var(--space-13);
    line-height: var(--leading-normal);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .mailing-list-modal {
        padding: var(--space-13);
    }
    
    .mailing-list-modal-inner {
        padding: var(--space-21);
    }
    
    .mailing-list-buttons {
        flex-direction: column;
    }
    
    .subscribe-btn,
    .unsubscribe-btn {
        flex: none;
        width: 100%;
    }
}