:root {
    --primary-color: #0069ff;
    --highlight-color: #ffff00;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --success-color: #34c759;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    padding: 10px;
    background-color: white;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* Changed from center to flex-start */
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: nowrap;  /* Changed from wrap to nowrap */
}

.flag-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;  /* Prevents shrinking */
}

.flag-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.flag-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.flag-icon {
    width: 20px;
    height: 14px;
}

h1 {
    text-align: left;  /* Changed from center to left */
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.2;
}

.content-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .content-container {
        flex-direction: column;
    }
}

.form-section {
    flex: 1;
    min-width: 0;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-section {
    flex: 1;
    min-width: 0;
    padding: 15px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 700px;
    overflow-y: auto;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 8px 12px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    min-width: 120px;  /* Fixed width to prevent jumping */
    text-align: center;  /* Center text in tab */
}

.tab:hover {
    background-color: var(--light-gray);
}

.tab.active {
    background-color: white;
    border-color: var(--border-color);
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.help-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
    position: relative;
}

.help-tooltip {
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    width: 300px;
    z-index: 100;
    font-size: 0.85rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.help-icon:hover .help-tooltip {
    visibility: visible;
}

.help-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    height: 80px;
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-note {
    font-size: 0.85rem;
    color: #666;
    margin-left: 26px;
    margin-top: 5px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.form-explanation {
    font-size: 0.85rem;
    color: #333;
    margin: 10px 0 15px 0;
    padding: 10px 10px 10px 15px;
    border-left: 3px solid #0069ff;
    background-color: #f8f9fa;
    line-height: 1.4;
    border-radius: 0 4px 4px 0;
}

.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 5px;
    flex-wrap: nowrap;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s, transform 0.1s;
    min-width: 80px;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: scale(0.98);
}

.btn.secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn.success {
    background-color: var(--success-color);
}

.btn svg,
.btn i {
    margin-right: 4px;
    width: 14px;
    height: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-content {
    padding: 10px;
    line-height: 1.6;
}

.preview-content h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.highlight {
    background-color: var(--highlight-color) !important;
    transition: background-color 0.3s ease-in-out;
}

.fade-highlight {
    background-color: transparent !important;
    transition: background-color 1s ease-out;
}

/* Apply highlight to both columns in a row */
.section-row.highlight .column {
    background-color: var(--highlight-color) !important;
}

.section-row.fade-highlight .column {
    background-color: transparent !important;
}

/* Document preview styles */
.section-row {
    display: flex;
    width: 100%;
    align-items: flex-start;
    margin-bottom: 15px;
}

.column {
    width: 50%;
    padding: 8px;
    vertical-align: top;
}

.left-column {
    border-right: 1px solid #ccc;
}

.section-title {
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.signatures {
    margin-top: 30px;
}

/* Educational components */
.legal-note {
    font-size: 0.85rem;
    padding: 8px;
    background-color: #f1f8ff;
    border-left: 3px solid var(--primary-color);
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

.legal-difference {
    background-color: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 8px;
    margin: 10px 0;
    font-size: 0.85rem;
    border-radius: 0 4px 4px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Global mobile adjustments */
    body {
        padding: 5px;
    }
    
    .main-container {
        padding: 5px;
    }
    
    /* Header adjustments */
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .flag-toggle-container {
        width: 100%;
        justify-content: center;
    }
    
    .flag-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
    }
    
    /* Content container - stack vertically on mobile */
    .content-container {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Form section adjustments */
    .form-section {
        padding: 15px;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    /* Preview section - collapsible on mobile */
    .preview-section {
        padding: 10px;
        height: auto;
        max-height: 400px;
        margin-bottom: 20px;
    }
    
    .preview-content h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Make preview expandable */
    .preview-section.collapsed {
        max-height: 60px;
        overflow: hidden;
    }
    
    .preview-section.collapsed .preview-content {
        display: none;
    }
    
    /* Tab navigation - horizontal scroll on mobile */
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 5px;
    }
    
    .tab {
        font-size: 0.85rem;
        padding: 8px 10px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    /* Form elements optimization */
    .form-group {
        margin-bottom: 12px;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
    }
    
    /* Help tooltip adjustments */
    .help-tooltip {
        width: 250px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    /* Checkbox optimization for mobile */
    .checkbox-label {
        align-items: flex-start;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
        margin-top: 2px;
    }
    
    .checkbox-note {
        font-size: 0.8rem;
        margin-left: 30px;
    }
    
    /* Button row - stack on very small screens */
    .button-row {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 10px 12px;
        min-width: auto;
        flex: 0 1 auto;
    }
    
    /* Make navigation buttons more prominent */
    .btn.secondary {
        border-width: 2px;
    }
    
    /* Document preview adjustments */
    .section-row {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
        padding: 5px;
    }
    
    .left-column {
        border-right: none;
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones in landscape) */
@media (max-width: 576px) {
    .tabs {
        margin-bottom: 10px;
    }
    
    .tab {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .form-section {
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    /* Stack the copy and download buttons */
    .button-row {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    /* Ensure buttons don't wrap their text */
    .btn svg,
    .btn i {
        margin-right: 4px;
    }
}

/* Fix for date input calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
    width: 20px;
    height: 20px;
}

/* Fix for select dropdowns on mobile */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom */
    }
    
    .tabs {
        -webkit-overflow-scrolling: touch;
    }
}

/* Summary tab styles */
.summary-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.summary-section h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 3px;
}

.summary-item.success-green {
    background-color: #f0f9f4;
    border-left: 3px solid var(--success-color);
}

.summary-item.warning-red {
    background-color: #fef5f3;
    border-left: 3px solid #e53e3e;
}

.summary-item.warning-yellow {
    background-color: #fffbeb;
    border-left: 3px solid #ed8936;
}

.summary-label {
    font-weight: bold;
    flex: 0 0 45%;
}

.summary-value {
    flex: 1;
    text-align: right;
}

.summary-warning {
    margin: 10px 0;
    padding: 10px;
    background-color: #fff9e6;
    border: 1px solid #ffd700;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #664d00;
    line-height: 1.4;
}

.provisions-list {
    margin: 10px 0;
}

.provision-included {
    color: var(--success-color);
    margin-bottom: 5px;
    font-weight: bold;
}

.provision-excluded {
    color: #e53e3e;
    margin-bottom: 5px;
}

.status-complete {
    color: var(--success-color);
    font-weight: bold;
    padding: 10px;
    background-color: #f0f9f4;
    border-radius: 4px;
    text-align: center;
}

.status-incomplete {
    color: #e53e3e;
    font-weight: bold;
    padding: 10px;
    background-color: #fef5f3;
    border-radius: 4px;
    text-align: center;
}

/* Instructional Screen Styles */
.instruction-screen {
    width: 100%;
    margin-top: 40px;
    background-color: #f8f9fa;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
}

.instruction-content {
    max-width: 1200px;
    margin: 0 auto;
}

.instruction-header {
    text-align: center;
    margin-bottom: 40px;
}

.instruction-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.instruction-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Instruction Cards */
.instruction-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.instruction-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Risk Spectrum */
.risk-levels {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.risk-level {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.risk-level.low {
    background-color: #f0f9f4;
    border: 2px solid #34c759;
}

.risk-level.medium {
    background-color: #fffbeb;
    border: 2px solid #f59e0b;
}

.risk-level.high {
    background-color: #fef5f3;
    border: 2px solid #ef4444;
}

.risk-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.risk-level h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.risk-level ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.risk-level li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Decision Tree */
.tree-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.tree-node {
    text-align: center;
    position: relative;
}

.node-content {
    background: #e8f5e9;
    padding: 15px 25px;
    border-radius: 8px;
    border: 2px solid #4caf50;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: bold;
}

.node-content.company {
    background: #e3f2fd;
    border-color: #2196f3;
}

.node-content.individual {
    background: #fff3e0;
    border-color: #ff9800;
}

.tree-branches {
    display: flex;
    gap: 40px;
    justify-content: center;
    position: relative;
}

.tree-branches::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background: #333;
}

.branch-left,
.branch-right {
    position: relative;
}

.branch-left::before,
.branch-right::before {
    content: '';
    position: absolute;
    top: -20px;
    width: 50%;
    height: 2px;
    background: #333;
}

.branch-left::before {
    right: 0;
}

.branch-right::before {
    left: 0;
}

.branch-left::after,
.branch-right::after {
    content: '';
    position: absolute;
    top: -20px;
    width: 2px;
    height: 20px;
    background: #333;
}

.branch-left::after {
    right: 0;
}

.branch-right::after {
    left: 0;
}

.node-details {
    max-width: 250px;
    margin: 0 auto;
    text-align: left;
}

.benefit {
    color: #4caf50;
    margin: 5px 0;
}

.warning {
    color: #f44336;
    margin: 5px 0;
}

/* Provisions Grid */
.provisions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.provision-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.provision-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.provision-impact {
    margin-top: 15px;
    text-align: left;
}

.impact-with,
.impact-without {
    margin-bottom: 10px;
}

.impact-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.impact-with {
    color: #4caf50;
}

.impact-without {
    color: #f44336;
}

/* Address Guide */
.address-examples {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.address-column {
    flex: 1;
    max-width: 400px;
}

.address-column h4 {
    margin-bottom: 15px;
    text-align: center;
    color: var(--primary-color);
}

.address-example {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.address-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.address-text {
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Jurisdiction Matrix */
.matrix-container {
    overflow-x: auto;
}

.compatibility-matrix {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.compatibility-matrix th,
.compatibility-matrix td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.compatibility-matrix th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.compat-good {
    background-color: #f0f9f4;
    color: #4caf50;
}

.compat-medium {
    background-color: #fffbeb;
    color: #f59e0b;
}

.compat-poor {
    background-color: #fef5f3;
    color: #ef4444;
}

/* Scope Selector */
.scope-options {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.scope-option {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.scope-option.narrow {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}

.scope-option.medium {
    background-color: #fff3e0;
    border: 2px solid #ff9800;
}

.scope-option.broad {
    background-color: #fce4ec;
    border: 2px solid #ec407a;
}

.scope-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.scope-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.scope-details {
    text-align: left;
}

.scope-best-for {
    margin-top: 15px;
    font-size: 0.9rem;
}

.scope-best-for ul {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
}

.scope-best-for li {
    margin-bottom: 3px;
}

/* Timeline */
.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #4caf50, #ffeb3b, #ff9800, #f44336);
}

.timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.timeline-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 auto 15px;
    position: relative;
    z-index: 1;
    background: white;
}

.timeline-item.green .timeline-marker {
    border: 3px solid #4caf50;
    color: #4caf50;
}

.timeline-item.yellow .timeline-marker {
    border: 3px solid #ffeb3b;
    color: #f59e0b;
}

.timeline-item.orange .timeline-marker {
    border: 3px solid #ff9800;
    color: #ff9800;
}

.timeline-item.red .timeline-marker {
    border: 3px solid #f44336;
    color: #f44336;
}

.timeline-content {
    max-width: 200px;
    margin: 0 auto;
}

.timeline-content h4 {
    margin-bottom: 5px;
}

.timeline-content p {
    font-size: 0.9rem;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.tip-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Footer CTA */
.instruction-footer {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: opacity 0.2s;
}

.cta-button:hover {
    opacity: 0.9;
}

/* Responsive adjustments for instructional content */
@media (max-width: 1024px) {
    .risk-levels {
        flex-direction: column;
    }
    
    .provisions-grid {
        grid-template-columns: 1fr;
    }
    
    .scope-options {
        flex-direction: column;
    }
    
    .timeline-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .timeline-container::before {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Instructional screen mobile optimization */
    .instruction-screen {
        padding: 20px 10px;
    }
    
    .instruction-content {
        padding: 0;
    }
    
    .instruction-header h2 {
        font-size: 1.5rem;
    }
    
    .instruction-subtitle {
        font-size: 1rem;
    }
    
    .instruction-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .instruction-card h3 {
        font-size: 1.2rem;
    }
    
    /* Risk spectrum mobile */
    .risk-level {
        margin-bottom: 15px;
    }
    
    .risk-icon {
        font-size: 2rem;
    }
    
    /* Decision tree mobile */
    .tree-container {
        padding: 10px;
    }
    
    .node-content {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .node-details {
        font-size: 0.85rem;
    }
    
    .tree-branches {
        flex-direction: column;
        gap: 20px;
    }
    
    .branch-left::before,
    .branch-right::before,
    .branch-left::after,
    .branch-right::after,
    .tree-branches::before {
        display: none;
    }
    
    /* Provisions grid mobile */
    .provision-item {
        padding: 15px;
    }
    
    .provision-icon {
        font-size: 1.5rem;
    }
    
    /* Address guide mobile */
    .address-examples {
        flex-direction: column;
        gap: 20px;
    }
    
    .address-example {
        padding: 12px;
    }
    
    .address-text {
        font-size: 0.8rem;
    }
    
    /* Jurisdiction matrix mobile */
    .compatibility-matrix {
        font-size: 0.85rem;
    }
    
    .compatibility-matrix th,
    .compatibility-matrix td {
        padding: 8px;
    }
    
    /* Scope selector mobile */
    .scope-option {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .scope-icon {
        font-size: 1.5rem;
    }
    
    /* Timeline mobile */
    .timeline-marker {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .timeline-content {
        font-size: 0.85rem;
    }
    
    /* Tips grid mobile */
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .tip-item {
        padding: 12px;
    }
    
    .tip-icon {
        font-size: 1.2rem;
    }
    
    /* Footer CTA mobile */
    .instruction-footer {
        padding: 20px;
    }
    
    .cta-button {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }
}

/* Extra small devices - instructional content */
@media (max-width: 576px) {
    .instruction-screen {
        margin-top: 20px;
    }
    
    .instruction-header h2 {
        font-size: 1.3rem;
    }
    
    .instruction-subtitle {
        font-size: 0.9rem;
    }
    
    .instruction-card {
        padding: 15px;
    }
    
    .instruction-card h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Make all text slightly smaller on very small screens */
    .risk-level ul li,
    .node-details p,
    .provision-impact p,
    .scope-details p,
    .timeline-content p,
    .tip-item p {
        font-size: 0.85rem;
    }
    
    /* Reduce spacing on very small screens */
    .instruction-card {
        margin-bottom: 15px;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) {
    /* Make interactive elements larger for touch */
    .help-icon {
        width: 24px;
        height: 24px;
        line-height: 24px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
    
    /* Ensure buttons have adequate touch targets */
    .btn {
        min-height: 44px;
    }
    
    .tab {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}