body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

nav {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    margin: 0 15px;
}

nav a:hover {
    color: #007bff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px; /* Slightly more padding for readability */
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* Optional: Emphasize the subject area */
.contact-table td:first-child {
    font-weight: bold;
    color: #0056b3; /* A slight blue tint */
}

code {
    background-color: #eee;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Style for the search container */
.search-container {
    padding: 10px 0;
    text-align: right; /* Places the search box on the right */
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

/* Style for the search input field */
.search-container input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px; /* Rounded left corners */
    width: 200px; /* Adjust width as needed */
    box-sizing: border-box;
    font-size: 14px;
}

/* Style for the search button */
.search-container button {
    padding: 8px 15px;
    background-color: #007bff; /* Use your primary color */
    color: white;
    border: 1px solid #007bff;
    border-radius: 0 4px 4px 0; /* Rounded right corners */
    cursor: pointer;
    margin-left: -5px; /* Pulls the button into the input field for a seamless look */
    font-size: 14px;
}

.search-container button:hover {
    background-color: #0056b3;
}
/* Universal rule to make all images responsive */
img {
    max-width: 100%; /* Ensures the image never exceeds its container's width */
    height: auto;    /* Maintains the image's aspect ratio to prevent distortion */
    display: block;  /* Helps with layout consistency */
}

/* Styling for the AI Persona Context */
.persona-context {
    border-left: 5px solid #0056b3; /* Blue border to stand out */
    background-color: #f7f9fc;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    max-width: 100%; 
    box-sizing: border-box; /* Crucial: Ensures padding/border are included in the 100% width */
}

.persona-focus {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

/* --- MOBILE SPECIFIC STYLES (Max Width 600px) --- */
@media (max-width: 600px) {

    /* 1. General Body and Containers */
    body {
        padding: 10px; /* Reduce padding on small screens */
    }
    
    /* 2. Navigation (Make links stack vertically) */
    nav a {
        display: block; /* Forces links onto new lines */
        padding: 8px 5px; /* Adjust padding for easier tapping */
        margin: 5px 0;
        border-bottom: 1px solid #eee; /* Add separator */
    }

    /* 3. Search Bar (Make it full width) */
    .search-container {
        text-align: center; /* Center the search form */
        padding: 15px 0;
    }
    
    .search-container input[type="text"] {
        width: 80%; /* Input takes up most of the width */
        border-radius: 4px; 
    }
    
    .search-container button {
        margin-top: 5px; /* Moves button to a new line */
        width: 80%;
        border-radius: 4px;
        margin-left: 0;
    }

    /* 4. Responsive Tables (Transforms rows into blocks) */
    .responsive-table, 
    .responsive-table thead, 
    .responsive-table tbody, 
    .responsive-table th, 
    .responsive-table td, 
    .responsive-table tr {
        display: block; /* Turns all table elements into stacking blocks */
    }

    /* 2. HASH WRAPPING RULE: Fixes long text (like SHA256) from scrolling off-screen */
    .responsive-table td, 
    .responsive-table td code {
        word-break: break-all; /* Forces hash to break onto a new line */
        white-space: normal;  /* Overrides any 'no-wrap' default on <td> or <code> */
        text-align: right;
        padding-left: 30%;
        position: relative; /* These properties should also be here for proper mobile TD styling */
    }
    
    /* Hide table headers (because they are now labels) */
    thead {
        display: none;
    }
    
    /* Style the table rows */
    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
    }
    
    /* Style the table data cells */
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 30%; /* Make space for the pseudo-label */
        text-align: right;
    }
    
    /* Use the header text as the label for each row (ADVANCED) */
    td::before {
        /* This section is advanced, but allows you to add the column name */
        content: attr(data-label); 
        position: absolute;
        left: 0;
        width: 25%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
    }
}
