/* ============================================================
   OPEN LETTER — Design System & Styles (v3 High Contrast)
   ============================================================ */

/* -- CSS Variables / Design Tokens -- */
:root {
    /* Palette — Deep indigo/purple dark theme (High Contrast) */
    --bg-primary: #05050f;
    --bg-secondary: #0a0a16;
    --bg-card: rgba(20, 20, 35, 0.85);
    --bg-card-hover: rgba(30, 30, 50, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #d4d4e0;
    --text-muted: #a0a0b8;

    --accent: #8b7dff;
    --accent-hover: #a399ff;
    --accent-glow: rgba(139, 125, 255, 0.4);
    --accent-soft: rgba(139, 125, 255, 0.15);

    --danger: #ff5c6c;
    --danger-hover: #ff7d8a;
    --danger-glow: rgba(255, 92, 108, 0.35);

    --success: #4ade80;
    --success-glow: rgba(74, 222, 128, 0.25);

    --border: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(139, 125, 255, 0.6);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    --shadow-glow: 0 0 40px var(--accent-glow);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Reset -- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* -- Background Particles -- */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    10%,
    90% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* -- Container -- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* -- Navbar -- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 10, 26, 0.7);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 26, 0.92);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-logo:hover {
    color: var(--accent);
}

.logo-icon {
    color: var(--accent);
    font-size: 1.4rem;
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* -- Hero -- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    border: 1px solid rgba(124, 108, 240, 0.2);
    color: var(--accent-hover);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 28px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-dot {
    -webkit-text-fill-color: var(--accent);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.45s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-hover);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 6px;
}

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), #5a4cd0);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.hero-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: glow-breathe 6s ease-in-out infinite;
}

@keyframes glow-breathe {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- Section -- */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
    margin: 0 auto 20px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
}

/* -- Letter Card -- */
.letter-section {
    background: var(--bg-secondary);
}

.letter-card {
    background: #1a1a2e;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px 56px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.letter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover), var(--accent));
}

.letter-content {
    font-family: var(--font-sans);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.letter-content a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: var(--transition);
}

.letter-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.letter-content p {
    margin-bottom: 1.6em;
}

.letter-content strong {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.letter-content h1 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.letter-content h3 {
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 56px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.letter-content ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.letter-content ol>li {
    margin-bottom: 1.5em;
    color: var(--text-primary);
    font-weight: 500;
}

.letter-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 24px;
}

.letter-content ul>li {
    margin-bottom: 1.5em;
    color: var(--text-primary);
    font-weight: 400;
}

.letter-content ul>li strong {
    color: var(--accent-hover);
}

/* Highlighted Quote */
.letter-content blockquote {
    background: rgba(139, 125, 255, 0.1);
    border-left: 4px solid var(--accent);
    padding: 24px 32px;
    margin: 40px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1.35rem;
    line-height: 1.6;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    font-family: var(--font-sans);
    font-weight: 500;
}

.letter-content blockquote p {
    margin: 0;
}

.letter-content blockquote strong {
    color: var(--accent-hover);
    font-weight: 700;
}

.letter-salutation {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px !important;
    font-size: 1.15rem;
}

.letter-closing {
    margin-top: 32px !important;
    font-style: italic;
    color: var(--text-primary);
}

.letter-signed {
    font-weight: 700;
    color: var(--accent-hover);
    font-size: 1.1rem;
}

/* -- Forms -- */
.forms-grid {
    display: flex;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    width: 100%;
    max-width: 500px;
}

.form-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--bg-card-hover);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.form-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.form-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sign-icon {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.remove-icon {
    background: rgba(240, 108, 122, 0.12);
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.required {
    color: var(--danger);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #555;
    background: #2a2a3a;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--bg-card-hover);
}

.form-group input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(240, 108, 122, 0.12);
}

.field-error {
    font-size: 0.85rem;
    color: var(--danger);
    margin-top: 6px;
    min-height: 0;
    transition: var(--transition-fast);
}

/* Toggle (Segmented Control) */
.form-toggle-container {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    padding: 4px;
    margin-bottom: 24px;
    position: relative;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    user-select: none;
    z-index: 2;
    position: relative;
    background: transparent;
}

.toggle-option:hover {
    color: var(--text-primary);
}

.toggle-option.active {
    color: #ffffff;
    background: transparent;
    box-shadow: none;
}

.toggle-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--accent);
    border-radius: var(--radius-full);
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.toggle-option:nth-of-type(1).active~.toggle-pill {
    transform: translateX(0);
}

.toggle-option:nth-of-type(2).active~.toggle-pill {
    transform: translateX(100%);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #5a4cd0);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #d04c5a);
    color: #fff;
    box-shadow: 0 4px 16px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--danger-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    margin-top: 12px;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    background: var(--bg-glass);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Verification Step */
.verification-step {
    text-align: center;
    padding: 10px 0;
}

.verification-step h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.verification-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.verification-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.verification-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
    margin-top: 8px;
    margin-bottom: 16px;
}

.spam-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fbbf24;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 16px 0;
    text-align: left;
    line-height: 1.5;
}

.spam-warning strong {
    color: white;
}

.code-display {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent-hover);
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success-glow);
    color: var(--success);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: success-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.remove-success-icon {
    background: var(--danger-glow);
    color: var(--danger);
}

@keyframes success-pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.success-message h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* -- Signatories -- */
.signatories-section {
    background: var(--bg-secondary);
}

.signatories-list {
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.signatory-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease-out both;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.signatory-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.signatory-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.signatory-content {
    flex: 1;
    min-width: 0;
}

.signatory-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.signatory-company {
    color: var(--accent-hover);
    font-size: 0.9rem;
    font-weight: 500;
}

.signatory-position {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.signatory-credentials {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 4px;
}

.signatory-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 8px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* -- Toast Container -- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    color: white;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 300px;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.toast-close:hover {
    color: white;
}

.toast.toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.toast.toast-info {
    background: linear-gradient(135deg, var(--accent), #5a4cd0);
}

.toast.toast-out {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* -- Footer -- */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* -- Responsive -- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .forms-grid {
        flex-direction: column;
    }

    .letter-card {
        padding: 40px 24px;
    }

    .signatories-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 24px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Header Image */
.header-image-container {
    text-align: center;
    margin-bottom: 32px;
}

.header-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease forwards;
    backdrop-filter: blur(10px);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-info {
    border-left: 4px solid var(--accent);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.field-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 6px;
}

.field-error {
    margin-top: 0 !important;
    /* Override existing */
    flex: 1;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.form-group:focus-within .char-count,
.char-count.visible {
    opacity: 1;
}

.char-count.warning {
    color: #fbbf24;
}

.char-count.danger {
    color: var(--danger);
}


/* Organization Signer Highlight */
.signatory-card.signatory-org {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.95), rgba(139, 125, 255, 0.08));
    border: 1px solid rgba(139, 125, 255, 0.3);
    box-shadow: 0 4px 20px rgba(139, 125, 255, 0.1);
}

.signatory-card.signatory-org:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(139, 125, 255, 0.2);
}

.org-badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 8px;
    border: 1px solid rgba(139, 125, 255, 0.2);
    vertical-align: middle;
    transform: translateY(-1px);
}


/* -- Supporting Organizations -- */
.supporters-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.supporters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.supporter-card {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.95), rgba(139, 125, 255, 0.06));
    border: 1px solid rgba(139, 125, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out both;
}

.supporter-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(139, 125, 255, 0.15);
    transform: translateY(-2px);
}

.supporter-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.supporter-card-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(139, 125, 255, 0.25);
    flex-shrink: 0;
}

.supporter-card-org {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-hover);
    line-height: 1.3;
    text-shadow: 0 0 20px var(--accent-glow);
}

.supporter-card-rep {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.supporter-card-rep strong {
    color: var(--text-primary);
    font-weight: 600;
}

.supporter-card-date {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .supporters-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Signatories Table -- */
.signatories-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 800px;
    /* Add reasonable max-height to prevent infinite scrolling on page */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

/* Table Container Enhancement */
.signatories-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.signatories-table {
    width: 100%;
    border-collapse: separate;
    /* Changed for border-radius on rows if needed, or stick to collapse */
    border-spacing: 0;
    text-align: left;
    min-width: 600px;
}

.signatories-table th,
.signatories-table td {
    padding: 20px 24px;
    /* Increased padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.signatories-table th {
    background: rgba(15, 15, 35, 0.95);
    /* Darker, more opaque header */
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    /* Separator line */
}

.signatories-table tr:last-child td {
    border-bottom: none;
}

.signatories-table tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.signatories-table tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Specific Column Styles */
.table-company-cell {
    color: #fff;
    /* Bright white for emphasis */
    font-weight: 500;
    letter-spacing: 0.01em;
}

.table-name-cell span {
    font-size: 1.05rem;
    /* Slightly larger name */
    color: var(--text-primary);
}

/* Table Avatar */
.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-right: 12px;
    vertical-align: middle;
}

.table-name-cell {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
}

.table-org-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: var(--accent-soft);
    color: var(--accent-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.table-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}


/* -- Progress Bar -- */
.progress-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
    /* Increased to make room for milestone label */
}

.progress-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.progress-count {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    filter: drop-shadow(0 2px 10px rgba(139, 125, 255, 0.3));
}

.progress-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    position: relative;
    overflow: visible;
    margin-bottom: 8px;
}

.progress-bar-bg {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius-full);
    overflow: hidden;
    /* masks the fill */
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b7dff);
    width: 0%;
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(139, 125, 255, 0.5);
    position: relative;
    z-index: 3;
    /* Bar is above the line */
}



.progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Specific Column Styles */
.table-company-cell {
    color: var(--accent-hover);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 0 12px var(--accent-glow);
}

/* Social Share Buttons */
.share-buttons-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn.linkedin {
    background: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
    border-color: rgba(10, 102, 194, 0.2);
}

.share-btn.linkedin:hover {
    background: rgba(10, 102, 194, 0.2);
    transform: translateY(-2px);
}

.share-btn.twitter {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.share-btn.twitter:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.share-btn.reddit {
    background: rgba(255, 69, 0, 0.1);
    color: #ff4500;
    border-color: rgba(255, 69, 0, 0.2);
}

.share-btn.reddit:hover {
    background: rgba(255, 69, 0, 0.2);
    transform: translateY(-2px);
}

.share-btn.mastodon {
    background: rgba(99, 100, 255, 0.1);
    color: #6364ff;
    border-color: rgba(99, 100, 255, 0.2);
}

.share-btn.mastodon:hover {
    background: rgba(99, 100, 255, 0.2);
    transform: translateY(-2px);
}

.share-btn.copy-link {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
    cursor: pointer;
}

.share-btn.copy-link:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}