body {
    background: #fafafa;
    font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
    margin: 0;
    padding: 40px;
}

/* home page */
.home-wrap { max-width: 680px; margin: auto; text-align: center; }
.subhome { margin-bottom: 30px; color: #555; }
.tool-card {
    cursor: pointer; padding: 20px 30px; background: white; border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: inline-block;
}
.tool-card:hover { background: #F3F0FF; }

/* original styles kept */
h1 { font-size: 26px; font-weight: 600; color: #1C0085; margin-bottom: 8px; }
.sub { font-size: 15px; color: #5A5A5A; margin-bottom: 30px; }
.container { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start; 
    width: 100%; 
    flex-wrap: wrap; /* Added for better responsiveness */
}
.preview { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    flex: 2; 
    min-width: 300px; 
}
.card{ 
    flex-shrink: 1; 
    min-width: 150px;
    max-width: 300px;
    background: white; 
    padding: 25px 30px; 
    border-radius: 10px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
    border: 1px solid #f0f0f0; /* Added subtle border */
}
label { display: block; margin-top: 12px; font-weight: 600; color: #1C0085; font-size: 14px; }
input { 
    width: 100%; 
    padding: 10px 12px; 
    font-size: 14px; 
    border: 1px solid #d3d3d3; 
    border-radius: 6px; 
    margin-top: 4px; 
    box-sizing: border-box; 
    transition: border-color 0.2s ease; /* Added transition */
}
input:focus { 
    outline: none; 
    border-color: #1C0085; 
    box-shadow: 0 0 0 2px rgba(28, 0, 133, 0.1); /* Better focus state */
}
button { 
    width: 100%; 
    background: #1C0085; 
    color: white; 
    padding: 12px; 
    font-size: 15px; 
    border: none; 
    border-radius: 6px; 
    margin-top: 20px; 
    cursor: pointer; 
    font-weight: 600; 
    transition: background-color 0.2s ease; 
}
button:hover { background: #3E2A82; }

/* signature boxes - improved */
.sig-box { 
    background: white; 
    padding: 20px; 
    padding-bottom: 50px; 
    border-radius: 8px; 
    border: 1px solid #E6E0F6; 
    position: relative; 
    transition: box-shadow 0.2s ease; /* Added hover effect */
}
.sig-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Subtle hover elevation */
}
.sig-label { 
    font-size: 13px; 
    font-weight: 600; 
    color: #1C0085; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.placeholder-msg { 
    display: block; 
    color: #8a8a8a; 
    font-style: italic; 
    text-align: center; 
    padding: 20px 0; 
}
.copy-btn { 
    width: 100%; 
    background: #1C0085; 
    color: white; 
    padding: 10px 0; 
    font-size: 12px; 
    border: none; 
    border-radius: 0 0 7px 7px; 
    cursor: pointer; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    transition: background-color 0.2s ease; 
    font-weight: 600; 
}
.copy-btn:hover { background: #3E2A82; }
.sig-toast { 
    position: absolute; 
    bottom: 45px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: rgba(255,255,255,0.95); 
    color: #1C0085; 
    font-size: 12px; 
    font-weight: 600; 
    padding: 6px 12px; 
    border-radius: 6px; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.35s ease, transform 0.35s ease; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    border: 1px solid #E6E0F6; 
}
.sig-toast.show { opacity: 1; transform: translate(-50%, -4px); }

/* Instructions card specific styles */
.instructions-card {
    flex: 1;
    min-width: 450px;
    max-width: 800px;
    flex-shrink: 1; 
    background: white; 
    padding: 25px 30px; 
    border-radius: 10px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
    border: 1px solid #f0f0f0; /* Added subtle border */
}

.instr-title {
    color: #1C0085;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid #F3F0FF;
    padding-bottom: 10px;
}

.instr-step {
    margin-bottom: 16px;
    line-height: 1.5;
    color: #444;
    word-wrap: break-word; /* Ensure text wrapping */
    overflow-wrap: break-word; /* Modern alternative */
    hyphens: auto; /* Optional: enables hyphenation */
}

.instr-step b {
    color: #1C0085;
}

.instr-highlight {
    background: #F3F0FF;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #1C0085;
}

.instr-step a {
    color: #1C0085;
    text-decoration: none;
    font-weight: 600;
}

.instr-step a:hover {
    text-decoration: underline;
}

/* Signature content styling */
.sig-inner {
    min-height: 60px;
    line-height: 1.4;
}

/* Remove blue outline from signature boxes */
.sig-box:focus,
.sig-inner:focus {
    outline: none;
}

/* Responsive improvements */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    
    .preview {
        order: 2;
        width: 100%;
    }
    
    .instructions-card {
        order: 3;
        max-width: 100%;
    }
    
    .card:first-child {
        order: 1;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px;
        padding-top: 70px;
    }
    
    .container {
        gap: 20px;
    }
    
    .card, .instructions-card {
        padding: 20px;
    }
}