/* Banner - completely invisible, just a centered container */
.banner {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    width: 100%;
    display: block;
}

/* Perfectly centered image */
.imagebanner {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 20px auto;
    padding: 0;
    text-align: center;
}

/* CSS variables for consistency */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --orange-accent: #ff5a1f;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-blue: #395870;
    --border: #c6c7cc;
    --light-bg: #f0f0f2;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* High contrast variables */
:root.high-contrast {
    --primary-color: #000000;
    --secondary-color: #000000;
    --accent-color: #0000ff;
    --orange-accent: #ff0000;
    --background: #ffffff;
    --surface: #ffffff;
    --text-primary: #000000;
    --text-secondary: #000000;
    --text-blue: #000000;
    --border: #000000;
    --light-bg: #ffffff;
    --shadow: 0 0 0 2px #000000;
    --shadow-lg: 0 0 0 3px #000000;
}

/* Accessibility button - fixed position top right */
.accessibility-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--surface);
    border: none;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.accessibility-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.accessibility-toggle:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Accessibility icon */
.accessibility-icon {
    transition: var(--transition);
    display: block;
}

/* Tooltip */
.accessibility-toggle::after {
    content: 'High-contrast mode';
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--surface);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.accessibility-toggle:hover::after {
    opacity: 1;
    visibility: visible;
}

/* High contrast mode styles */
.high-contrast .accessibility-toggle {
    background: #ffffff;
    border: none;
}

.high-contrast .accessibility-icon {
    fill: #000000;
}

.high-contrast .accessibility-toggle::after {
    background: #000000;
    color: #ffffff;
    border: none;
}

/* Base styles */
body {
    margin: 10px;
    padding: 0px;
    font: 14px 'Inter', Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* High contrast mode for images */
.high-contrast .imagebanner {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 10px;
    filter: contrast(200%) grayscale(100%);
}

/* Forms */
form {
    border-radius: var(--radius);
    font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow: hidden;
}

/* Footer */
#footer {
    width: calc(100% - 20px);
    max-width: 100%;
    min-height: 100px;
    height: auto;
    background: var(--surface);
    margin: 40px auto 0 auto;    
    bottom: 0;
    clear: both;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    overflow: hidden;
    flex-wrap: wrap;
    padding: 10px;
}

div#footer {
    text-align: center;
}

#footer img {
    transition: var(--transition);
    border-radius: var(--radius);
    height: 60px;
    width: auto;
    flex-shrink: 1;
    object-fit: contain;
}

#footer img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* High contrast mode for footer */
.high-contrast #footer {
    border: 3px solid #000000;
    background: #ffffff;
}

.high-contrast #footer img {
    filter: contrast(1000%) brightness(0) saturate(0);
    border: 2px solid #000000;
}

/* Mobile responsive - does NOT touch desktop screens */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }

    .accessibility-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .accessibility-icon {
        width: 20px;
        height: 20px;
    }

    .accessibility-toggle::after {
        right: 55px;
        font-size: 11px;
        padding: 6px 10px;
    }

    /* Responsive footer */
    #footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 15px;
        text-align: center;
        gap: 15px;
    }

    #footer img {
        margin: 5px;
        max-width: 80px;
        max-height: 40px;
        object-fit: contain;
    }
}

.title {
    padding: 10px 10px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 28px; 
    line-height: 46px;
    font-weight: bold;
    text-align: center;
    margin: 0px;
    background: linear-gradient(135deg, var(--orange-accent), #ff7849);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* High contrast mode for title */
.high-contrast .title {
    background: none;
    -webkit-text-fill-color: initial;
    color: #000000;
    text-shadow: none;
}

/* Menu */
.menu {
    font-size: 16px;
    padding: 10px;
    font-family: 'Inter', 'Verdana', sans-serif;
    text-align: center;
}

/* Molecule image */
.mol_img {
    float: right;
    margin-right: 30px;
    background: var(--surface);
    padding: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.high-contrast .mol_img {
    border: 2px solid #000000;
}

/* Form parent */
.form_parent {
    width: 60%;
    margin: 0 auto 0 auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
}

.high-contrast .form_parent {
    border: 3px solid #000000;
}

/* Banner */
.banner {
    top: 0;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.imagebanner {
    max-width: 30%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: brightness(1.1);
}

/* Type of item */
.type_of_item {
    padding: 10px 0px;
    font-family: 'Inter', 'Verdana', sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    margin-bottom: 10px;
}

.high-contrast .type_of_item {
    border-bottom: 3px solid #000000;
}

/* Fieldsets */
fieldset {
    border: 1px solid var(--border);
    margin: 10px 0;
    padding: 0;
    border-radius: var(--radius);
    background: var(--light-bg);
}

.high-contrast fieldset {
    border: 3px solid #000000;
    background: #ffffff;
}

.extract-info {
    padding: 10px 20px 0 20px;
}

.extract-info_inline {
    padding: 10px 20px 0 20px;
}

.extract-info label {
    color: var(--text-blue);
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    cursor: pointer;
}

.extract-info_inline label {
    color: var(--text-blue);
    font-weight: bold;
    margin-bottom: 10px;
    cursor: pointer;
}

/* Inputs */
.extract-info input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.extract-info input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.high-contrast .extract-info input {
    border: 3px solid #000000;
    background: #ffffff;
    color: #000000;
}

.high-contrast .extract-info input:focus {
    outline: 3px solid #0000ff;
    outline-offset: 2px;
    box-shadow: none;
}

.extract-info_inline input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.extract-info_inline input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.high-contrast .extract-info_inline input {
    border: 3px solid #000000;
    background: #ffffff;
    color: #000000;
}

.high-contrast .extract-info_inline input:focus {
    outline: 3px solid #0000ff;
    outline-offset: 2px;
    box-shadow: none;
}

/* Centered labels */
.centered-label {
    color: var(--text-blue);
    display: block;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius);
}

.high-contrast .centered-label {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}

.footnote-label {
    text-align: center;
}

.text-footnote {
    font-size: 12px;
    color: var(--text-secondary);
}

.text-footnote ul {
    list-style: none;
    padding: 10px;
}

.text-footnote li {
    margin-bottom: 10px;
    padding: 10px;
    background: var(--surface);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-color);
}

.high-contrast .text-footnote li {
    border: 2px solid #000000;
    border-left: 5px solid #000000;
    background: #ffffff;
}

.text-footnote a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.text-footnote a:hover {
    text-decoration: underline;
}

.high-contrast .text-footnote a {
    color: #0000ff;
    text-decoration: underline;
}

.high-contrast .text-footnote a:hover {
    background: #ffff00;
    color: #000000;
}

/* Extract action */
.extract-action {
    background: var(--light-bg);
    border-top: 1px solid var(--border);
    padding: 20px;
    margin-top: 20px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.high-contrast .extract-action {
    border-top: 3px solid #000000;
    background: #ffffff;
}

.extract-action .btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 0;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    float: left;
    padding: 8px 16px;
    margin-left: 5px;
    margin-right: 5px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.extract-action .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.high-contrast .extract-action .btn {
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
}

.high-contrast .extract-action .btn:hover {
    background: #000000;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.extract-action label {
    color: #7c7c80;
    font-size: 22px;
    float: right;
}

.high-contrast .extract-action label {
    color: #000000;
}

/* Results */
.extract-result {
    font-size: 18px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: var(--radius);
    margin: 10px 0;
    font-weight: bold;
}

.extract-result a {
    color: white;
    text-decoration: underline;
}

.high-contrast .extract-result {
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
}

.high-contrast .extract-result a {
    color: #0000ff;
}

.extract-details {
    margin: 10px auto;
    padding: 20px;
    width: 50%;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.high-contrast .extract-details {
    border: 2px solid #000000;
}

.extract-details p {
    font: 14px Verdana, sans-serif; 
    margin: auto;
}

.extract-details ul {
    font: 12px Verdana, sans-serif; 
    margin: auto;
}

.img-result {
    margin: auto;
    text-align: center;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.high-contrast .img-result {
    border: 2px solid #000000;
}

/* Links */
a:link, a:visited {
    color: var(--accent-color);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.high-contrast a:link, 
.high-contrast a:visited {
    color: #0000ff;
    text-decoration: underline;
}

.high-contrast a:hover {
    background: #ffff00;
    color: #000000;
}

/* Search bar */
#searchInput {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.high-contrast #searchInput {
    border: 3px solid #000000;
    background: #ffffff;
    color: #000000;
}

.high-contrast #searchInput:focus {
    outline: 3px solid #0000ff;
    outline-offset: 2px;
}

.divTable {
    font-family: 'Inter', 'Verdana', sans-serif;
    color: var(--text-blue);
    display: table;
    width: auto;
    margin: 30px auto;
    padding: 10px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-spacing: 5px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.high-contrast .divTable {
    border: 3px solid #000000;
    background-color: #ffffff;
}

.divRow {
    display: table-row;
    width: auto;
    transition: var(--transition);
}

.divRow:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.divRow:first-child {
    background: white;
    color: var(--text-blue);
    font-weight: bold;
    border-bottom: 2px solid var(--border);
}

.divRow:first-child:hover {
    background: white;
}

.high-contrast .divRow:hover {
    background-color: #f0f0f0;
    border: 2px solid #000000;
}

.high-contrast .divRow:first-child {
    background: #ffffff;
    color: #000000;
    border-bottom: 3px solid #000000;
}

.high-contrast .divRow:first-child:hover {
    background: #ffffff;
}

.divCell {
    float: left;
    display: table-column;
    width: 170px;
    background-color: transparent;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.divCell a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
    background: rgba(37, 99, 235, 0.1);
    display: inline-block;
}

.divCell a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* High contrast mode for table links */
.high-contrast .divCell a {
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
    text-decoration: underline;
}

.high-contrast .divCell a:hover {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    transform: none;
    box-shadow: none;
}

/* Other table classes */
.div-table {
    display: table;         
    width: auto;         
    border: 1px solid var(--border);         
    border-spacing: 5px;
    margin: 10px auto;
    font: 14px Verdana, sans-serif;
    background: var(--surface);
    border-radius: var(--radius);
}

.high-contrast .div-table {
    border: 3px solid #000000;
    background: #ffffff;
}

.div-table-row {
    display: table-row;
    width: auto;
    clear: both;
}

.div-table-col {
    float: left;
    display: table-column;         
    width: 200px;         
}

/* HR */
hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1em 0;
    padding: 0;
}

.high-contrast hr {
    border-top: 3px solid #000000;
}

/* References */
.references {
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.high-contrast .references {
    border: 2px solid #000000;
}

.references h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px;
    font: 16px Verdana, sans-serif;
    margin: 0;
}

.high-contrast .references h2 {
    background: #000000;
    color: #ffffff;
}

.references p {
    color: var(--text-primary);
    margin: auto;
    padding: 15px;
}

/* Pre */
pre {
    display: block;
    font-family: monospace;
    white-space: pre;
    margin: 1em 0;
    background: var(--light-bg);
    padding: 10px;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-color);
}

.high-contrast pre {
    background: #ffffff;
    border: 2px solid #000000;
    border-left: 5px solid #000000;
}

/* Modern buttons for Select All / Deselect All */
button {
    background: var(--surface);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    margin: 5px;
    font-size: 14px;
}

button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.high-contrast button {
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
}

.high-contrast button:hover {
    background: #000000;
    color: #ffffff;
    transform: none;
}

.high-contrast button:focus {
    outline: 3px solid #0000ff;
    outline-offset: 2px;
}

/* WAVENUMBER RANGE SELECTOR */
.wavenumber-selector {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.high-contrast .wavenumber-selector {
    border: 3px solid #000000;
    background: #ffffff;
}

/* Colored strip - COMPACT */
.range-track {
    height: 8px;
    background: linear-gradient(90deg, 
        #ff4444 0%, 
        #ff8800 25%, 
        #ffdd00 50%, 
        #88ff00 75%, 
        #00ffff 100%);
    border-radius: 4px;
    margin: 0;
    position: relative;
}

.high-contrast .range-track {
    background: #ffffff;
    border: 2px solid #000000;
}

/* Selection zone on the strip */
.range-selection {
    position: absolute;
    height: 8px;
    background-color: rgba(37, 99, 235, 0.4);
    border: 1px solid #2196F3;
    border-radius: 4px;
    top: 0;
    z-index: 1;
}

.high-contrast .range-selection {
    background-color: #000000;
    border: 2px solid #000000;
}

/* Slider container - CLOSE */
.slider {
    width: 100%;
    position: relative;
    height: 35px;
    margin: 8px 0;
}

.range-input {
    position: absolute;
    width: 100%;
    top: 5px;
    height: 0;
}

/* Complete reset of sliders */
.range-input input[type=range] {
    pointer-events: none !important;
    position: absolute !important;
    width: 100% !important;
    height: 12px !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    border: 2px solid #2196F3 !important;
    border-radius: 6px !important;
}

.high-contrast .range-input input[type=range] {
    border: 3px solid #000000 !important;
}

.range-input input[type=range]::-webkit-slider-thumb {
    pointer-events: auto !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: #ff0000 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 3px solid #2196F3 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

.range-input input[type=range]::-moz-range-thumb {
    pointer-events: auto !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #ff0000 !important;
    cursor: pointer !important;
    border: 3px solid #2196F3 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    -moz-appearance: none !important;
}

.high-contrast .range-input input[type=range]::-webkit-slider-thumb {
    border: 4px solid #000000 !important;
}

.high-contrast .range-input input[type=range]::-moz-range-thumb {
    border: 4px solid #000000 !important;
}

/* Distinct colors with blue edge */
#minRange::-webkit-slider-thumb {
    background: #ff0000 !important;
    border: 3px solid #2196F3 !important;
}

#maxRange::-webkit-slider-thumb {
    background: #0000ff !important;
    border: 3px solid #2196F3 !important;
}

#minRange::-moz-range-thumb {
    background: #ff0000 !important;
    border: 3px solid #2196F3 !important;
}

#maxRange::-moz-range-thumb {
    background: #0000ff !important;
    border: 3px solid #2196F3 !important;
}

.high-contrast #minRange::-webkit-slider-thumb {
    background: #ff0000 !important;
    border: 4px solid #000000 !important;
}

.high-contrast #maxRange::-webkit-slider-thumb {
    background: #0000ff !important;
    border: 4px solid #000000 !important;
}

.high-contrast #minRange::-moz-range-thumb {
    background: #ff0000 !important;
    border: 4px solid #000000 !important;
}

.high-contrast #maxRange::-moz-range-thumb {
    background: #0000ff !important;
    border: 4px solid #000000 !important;
}

/* CLOSE labels */
.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

.value-displays {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.value-box {
    background: var(--light-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
}

.high-contrast .value-box {
    background: #ffffff;
    border: 3px solid #000000;
}

.value-label {
    font-weight: bold;
    color: var(--text-blue);
    font-size: 14px;
    margin-bottom: 8px;
}

.value-input {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    width: calc(100% - 24px);
    text-align: center;
    transition: var(--transition);
    box-sizing: border-box;
}

.value-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.high-contrast .value-input {
    background: #ffffff;
    border: 3px solid #000000;
    color: #000000;
}

.high-contrast .value-input:focus {
    outline: 3px solid #0000ff;
    outline-offset: 2px;
    box-shadow: none;
}

.unit {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 5px;
}

/* Mobile responsive - does NOT touch desktop screens */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }
    .accessibility-toggle {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .accessibility-icon {

    }

    .accessibility-toggle::after {
        right: 55px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .form_parent {
        width: 95%;
        margin: 0;
        padding: 15px;
        border-radius: 0;
    }

    /* Transform table to vertical layout on mobile only */
    .divTable {
        display: block;
        width: 100%;
        margin: 10px 0;
        padding: 10px;
        border-spacing: 0;
        border-radius: 0;
        box-sizing: border-box;
    }

    .divRow {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        padding: 15px;
        background: rgba(59, 130, 246, 0.05);
        border-radius: 0;
        border: 1px solid var(--border);
        box-sizing: border-box;
    }

    .divRow:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .high-contrast .divRow {
        background: #ffffff;
        border: 2px solid #000000;
    }

    .high-contrast .divRow:hover {
        background: #f0f0f0;
        border: 3px solid #000000;
    }

    .headRow {
        display: none;
    }

    .divCell {
        display: block;
        float: none;
        width: 100%;
        margin-bottom: 8px;
        padding: 5px 0;
        text-align: left;
        background: transparent;
    }

    /* Add labels to clarify data on mobile */
    .divCell:nth-child(1):before {
        content: "HITRAN ID: ";
        font-weight: bold;
        color: var(--text-blue);
    }

    .divCell:nth-child(2):before {
        content: "Formula: ";
        font-weight: bold;
        color: var(--text-blue);
    }

    .divCell:nth-child(3):before {
        content: "Database: ";
        font-weight: bold;
        color: var(--text-blue);
    }

    .high-contrast .divCell:nth-child(1):before,
    .high-contrast .divCell:nth-child(2):before,
    .high-contrast .divCell:nth-child(3):before {
        color: #000000;
    }

    /* Adjust links on mobile */
    .divCell a {
        display: block;
        margin-top: 5px;
        padding: 10px 15px;
        text-align: center;
    }

    /* Adjust banner on mobile */
    .imagebanner {
        max-width: 60%;
    }

    /* Adjust search bar */
    #searchInput {
        width: 90% !important;
        max-width: 300px;
    }

    /* Responsive footer */
    #footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 15px;
        text-align: center;
        gap: 15px;
    }

    #footer img {
        margin: 5px;
        max-width: 80px;
        max-height: 40px;
        object-fit: contain;
    }

    /* Wavenumber selector responsive */
    .wavenumber-selector {
        padding: 20px 15px;
    }
    
    .value-displays {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Tablets - intermediate adjustment */
@media (min-width: 769px) and (max-width: 1024px) {
    .form_parent {
        width: 80%;
    }
    
    .divCell {
        width: 140px;
    }
}
