/* Base Layout Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.5;
}

/* Hide nav-bar on submit form page */
.submit-form-page ~ .nav-bar,
body:has(.submit-form-page) .nav-bar {
    display: none;
}

/* Breadcrumb Bar - Light grey bar with dark green top border (Issue #60) */
.breadcrumb-bar {
    background-color: #F0F0F0;
    border-top: 8px solid #243413;
    padding: 6px 40px;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 0 auto;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #1B1B1B;
    font-size: 13px;
    font-weight: 400;
    width: 100%;
    flex-wrap: wrap;
    word-break: break-word;
}

.breadcrumb-link {
    color: #1B1B1B;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.breadcrumb-link:hover {
    color: #243413;
}

.breadcrumb-separator {
    color: #1B1B1B;
    font-weight: 400;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-current {
    color: #1B1B1B;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Page Layout */
.submit-form-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 40px;
    width: 100%;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
}

/* Project Header - Matching project detail page style */
.project-header {
    margin-bottom: 2rem;
    margin-top: 0;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.project-title {
    font-size: 2rem; /* ~32px */
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Status Badge - Matching project detail page style */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* Full rounded pill */
    font-size: 0.75rem; /* 12px */
    font-weight: 500; /* Medium weight for better contrast */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
}

.status-in-progress {
    background-color: #FBBF24;
    color: #1a1a1a;
}

.status-completed {
    background-color: #D3E7A6;
    color: #1a1a1a;
}

.status-cancelled {
    background-color: #FB7185;
    color: #1a1a1a;
}

.status-developing-proposal {
    background-color: #BEE7F5;
    color: #1a1a1a;
}

.project-hierarchy {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
    margin-top: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

/* Legal Notice Box */
.legal-notice-box {
    background-color: #FEFCE9; /* var(--yellow-2) */
    border: 1px solid #E5E5E5; /* var(--border) */
    border-radius: 12px; /* rounded-xl */
    padding: 16px 16px; /* p-2 */
    margin: 0 0 32px 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    max-width: 892px;
    width: 100%;
    box-sizing: border-box;
}

.notice-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon img {
    width: 24px;
    height: 24px;
    color: #000000;
    filter: brightness(0); /* Make icon black */
}

.notice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.notice-title {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 22px;
    color: #000000;
    font-weight: 400;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0; /* Allow text to shrink */
}

.notice-actions {
    display: flex;
    gap: 12px;
}

.notice-btn {
    background: #FFFFFF; /* var(--background) */
    border: 1px solid #E5E5E5; /* var(--border) */
    border-top: 1px solid #E5E5E5;
    padding: 4px 16px; /* gap-0.5 top/bottom, p-2 left/right */
    border-radius: 8px; /* rounded-lg */
    font-size: 14px;
    color: #171717;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.notice-btn:hover {
    background: #fafafa;
}

/* Form Layout */
.form-layout {
    display: grid;
    grid-template-columns: 892px 434px; /* Fixed widths as per mockup specs */
    gap: 24px;
    align-items: start;
    margin: 0;
    padding-bottom: 40px;
}

.form-main-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 892px;
    max-width: 100%;
    min-width: 0; /* Allow flex shrinking */
}

.form-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 434px;
    max-width: 100%;
    min-width: 0; /* Allow flex shrinking */
}

/* Section Titles */
.section-title-large {
    font-size: 20px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 8px;
}

/* Input Method Section */
.input-method-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-label {
    font-size: 16px;
    font-weight: 600;
    color: #171717;
    display: block;
    margin-bottom: 8px;
}

.field-hint {
    font-weight: 400;
    font-size: 14px;
    color: #737373;
    margin-left: 4px;
}

/* Textarea */
.comment-textarea {
    width: 100%;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 16px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    min-height: 385px; /* Height from Figma */
}

.comment-textarea:focus {
    outline: 2px solid #171717;
    border-color: transparent;
}

/* Upload Toggle & Logic - Positioned below textarea, centered */
.upload-toggle-container {
    margin-top: 10px;
    display: flex;
    justify-content: center; /* Center the button per mockup */
    width: 100%;
}

.hidden-radio {
    display: none;
}

.upload-toggle-btn {
    cursor: pointer;
    display: inline-block;
}

.full-width-upload {
    width: auto; /* Changed from 100% to auto for pill button */
}

.upload-action-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 100px; /* Pill shape */
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #171717;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.upload-action-content:hover {
    background: #f5f5f5;
    border-color: #d4d4d4;
}

.upload-icon-small {
    width: 16px;
    height: 16px;
}

/* Disabled Upload Toggle - Soft Launch */
.upload-toggle-disabled .upload-toggle-btn {
    cursor: not-allowed;
    pointer-events: none;
}

.upload-toggle-disabled .upload-action-content {
    opacity: 0.5;
    background: #f5f5f5;
    border-color: #d4d4d4;
    cursor: not-allowed;
}

.upload-toggle-disabled .upload-action-content:hover {
    background: #f5f5f5;
    border-color: #d4d4d4;
}

/* Coming Soon Badge */
.coming-soon-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #737373;
    background-color: #e5e5e5;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* File Upload Area Active State */
.file-upload-area-active {
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
    background: #FAFAFA;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.switch-to-text-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.upload-dropzone {
    display: block; /* Ensure label displays as block */
    border: 2px dashed #D4D4D4;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    position: relative;
}

.upload-input {
    position: absolute;
    /* Use inset: 0 instead of top/left/width/height to ensure full coverage */
    /* This makes the input stretch to the padding edges, not just content */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-text {
    font-size: 16px;
    font-weight: 500;
    margin: 12px 0 4px;
    color: #171717;
}

.link-text {
    color: #2563eb;
    text-decoration: underline;
}

.dropzone-hint {
    font-size: 12px;
    color: #737373;
}

.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    margin-bottom: 8px;
    gap: 8px;
}

.file-name {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
    word-break: break-word;
    flex: 1;
}

.file-size {
    font-size: 12px;
    color: #737373;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: #737373;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.file-remove:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.file-remove:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}

/* Identification Section */
.identification-section {
    margin-top: 32px;
}

.section-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #171717;
}

.identification-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.id-option-card {
    cursor: pointer;
    position: relative;
}

.id-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.id-card-content {
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 24px;
    height: 100%; /* Match heights */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    background: white;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.id-option-card input:checked + .id-card-content {
    border-color: #538200; /* Match icon selected state color (green) */
    box-shadow: 0 0 0 1px #538200;
    background-color: #F0FDF4; /* Green-50 */
}

.id-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: transparent; /* Icons have white circles built-in */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* No padding needed since icons have their own circles */
}

.commenter-icon {
    width: 64px;
    height: 64px;
    display: block;
    transition: opacity 0.2s ease; /* Smooth transition when switching states */
}

/* Remove .id-icon-circle.green class - icons handle their own selected state colors */

.id-title {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    color: #171717;
}

.id-desc {
    font-size: 13px;
    color: #525252;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Contact Info Forms - Cards */
.contact-info-section {
    background: #FDFBF7; /* Light beige/warm grey - matching mockup */
    border: 1px solid #E5E5E5; /* var(--border, #E5E5E5) */
    border-radius: 12px; /* rounded-xl */
    padding: 24px;
    padding-bottom: 24px; /* Issue #61: Explicit padding-bottom for contact block */
    box-shadow: none; /* Removed shadow to look clean as a sub-section */
    margin-top: 24px;
    width: 100%;
}

/* Individual Card Spec: 892 x 526 - min-height removed per review */
#individual-info-section {
    /* min-height: 526px; - Removed per beta review feedback */
}

/* Organization Card Spec: 892 x 342 - min-height removed per review */
#organization-info-section {
    /* min-height: 342px; - Removed per beta review feedback */
}

/* Anonymous Card Spec: 892 x 250 - min-height removed per review */
#anonymous-info-section {
    /* min-height: 250px; - Removed per beta review feedback */
}

.contact-info-section.hidden {
    display: none;
}

.info-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #171717;
}

.info-subtitle {
    font-size: 14px;
    color: #525252;
    margin-bottom: 24px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #171717;
}

.form-input, .form-select {
    padding: 10px 12px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* Issue #62: Address field width fix - ensure address inputs/textareas use full container width */
.form-input[name*="address"],
.form-group.address-field .form-input,
textarea.address-textarea,
#address,
input[id*="address"],
textarea[id*="address"] {
    width: 100%;
    box-sizing: border-box;
}

.form-select {
    padding-right: 2.5rem; /* Extra padding-right for dropdown arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    /* Remove default browser styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.form-input:focus, .form-select:focus {
    outline: 2px solid #171717;
    border-color: transparent;
}

/* Recaptcha */
.recaptcha-box {
    margin: 24px 0;
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    background: #F9F9F9;
    border: 1px solid #DFE1E2;
    box-shadow: 0px 4px 7.6px 0px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    border-radius: 2px;
}

.recaptcha-info {
    width: 100%;
}

.recaptcha-notice {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.recaptcha-notice a {
    color: #000000;
    text-decoration: none;
}

.recaptcha-notice a:hover {
    text-decoration: underline;
}

.recaptcha-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 149px;
    height: 24px;
    background: transparent;
    border: none;
    padding: 0;
}

.recaptcha-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: default;
}

.recaptcha-checkbox label {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000;
}

.recaptcha-logo-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 58px;
}

.recaptcha-logo-small img {
    width: 32px;
    height: 32px;
    margin: 0;
}

.recaptcha-logo-small span {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 10px;
    color: #2E2E2E;
}

.recaptcha-links {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 8px;
    line-height: 10px;
    color: #2E2E2E;
    white-space: nowrap;
}

.recaptcha-links a {
    color: #2E2E2E;
    text-decoration: none;
}

.recaptcha-links a:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn-black {
    background-color: #171717;
    color: white;
    width: auto;
    min-width: 160px;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
}

.submit-btn-black:hover {
    background-color: #000000;
}

.submit-btn-black:disabled {
    background-color: #A3A3A3;
    cursor: not-allowed;
}

/* Sidebar Cards */
.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Spec gap */
    width: 434px; /* Spec width */
}

.sidebar-card {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    width: 434px;
}

.map-card {
    width: 434px;
    height: 358px;
    display: flex;
    flex-direction: column;
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid #E5E5E5;
    border-top: 1px solid #E5E5E5;
    background: #FFFFFF;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%; /* Fill the entire card */
    z-index: 1;
}

/* Location Text Card */
.location-text-card {
    margin-top: 0;
    margin-bottom: 0;
    padding: 12px 0;
}

.location-text {
    font-size: 14px;
    color: #525252;
    margin: 0;
    line-height: 1.5;
}

.contact-card {
    width: 434px;
    height: 208px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 1.5rem; /* py-6 top/bottom, px-6 left/right */
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #111827;
}

.contact-details p {
    margin: 0 0 0.35rem 0;
    font-size: 0.875rem;
    color: #4B5563;
    line-height: 1.4;
}

.contact-name {
    color: #111827 !important;
    font-weight: 600;
    margin-bottom: 0.25rem !important;
}

.contact-details a {
    color: #4B5563;
    text-decoration: underline;
}

.contact-details a:hover {
    color: #111827;
}

/* Validation Errors */
.field-error {
    color: #DC2626;
    font-size: 12px;
    margin-top: 4px;
}

.input-error {
    border-color: #DC2626 !important;
}

.error-message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* Attachment Extraction Display (ADR-600) */
.extraction-details {
    margin-top: 8px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    background: #FAFAFA;
    overflow: hidden;
}

.extraction-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #525252;
    transition: background-color 0.2s;
    list-style: none;
}

.extraction-summary::-webkit-details-marker {
    display: none;
}

.extraction-summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.2s;
}

details[open] .extraction-summary::before {
    transform: rotate(90deg);
}

.extraction-summary:hover {
    background: #F0F0F0;
}

.extraction-icon {
    width: 14px;
    height: 14px;
    stroke: #525252;
    flex-shrink: 0;
}

.extracted-text-content {
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background: #FFFFFF;
    border-top: 1px solid #E5E5E5;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.extraction-failed {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 6px;
    font-size: 13px;
}

.extraction-warning-icon {
    width: 14px;
    height: 14px;
    stroke: #DC2626;
    flex-shrink: 0;
}

.extraction-failed-text {
    color: #991B1B;
    font-weight: 500;
}

/* Comment Detail Sidebar Styles */
.comment-detail-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.comment-content-section {
    min-width: 0;
}

.comment-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.commenter-info-section {
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

.info-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.info-section-content {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.4;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attachment-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    width: 20px;
    height: 20px;
    stroke: #525252;
    flex-shrink: 0;
}

.attachment-name {
    font-size: 14px;
    color: #2563EB;
    text-decoration: none;
    word-break: break-word;
}

.attachment-name:hover {
    text-decoration: underline;
}

.attachment-name.unavailable {
    color: #737373;
    font-style: italic;
}

.attachment-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #737373;
    padding-left: 28px;
}

.attachment-size {
    color: #737373;
}

.attachment-description {
    color: #525252;
}

/* Comment Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #E5E5E5;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #171717;
    text-decoration: none;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    background: #FFFFFF;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background: #F5F5F5;
}

.nav-button.disabled {
    color: #A3A3A3;
    cursor: not-allowed;
    background: #FAFAFA;
}

.comment-counter {
    font-size: 14px;
    color: #525252;
}

.comment-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.comment-text p {
    margin-bottom: 1rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background: #F3F4F6;
    color: #374151;
}

/* Project Title & Subtitle (Comment Detail) */
.project-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
}

/* Responsive for Comment Detail */
@media (max-width: 900px) {
    .comment-detail-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .comment-sidebar {
        order: -1;
    }
}

@media (max-width: 480px) {
    .comment-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .nav-button {
        width: 100%;
        justify-content: center;
    }

    .extracted-text-content {
        max-height: 150px;
    }
}

/* Modal Base Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1001;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #737373;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Checklist Modal Specific Styles - Matching Figma Specs */
#checklist-modal .modal-content {
    width: 880px;
    max-width: 880px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 4px 7.6px 0px rgba(0, 0, 0, 0.25);
}

#checklist-modal .modal-header {
    padding: 40px 24px 0 24px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#checklist-modal .modal-title {
    font-family: 'Roboto', sans-serif;
    font-size: 21.92px;
    font-weight: 600;
    font-style: normal;
    color: #111827;
    margin: 0;
    width: 776px;
    height: 26px;
    line-height: 26px;
    letter-spacing: 0%;
    max-width: 776px;
}

#checklist-modal .modal-body {
    padding: 0 24px 24px 24px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.checklist-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    max-width: 776px;
    margin: 0 auto;
    font-family: 'Roboto', sans-serif;
}

.checklist-title-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checklist-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #111827;
    margin: 0;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 776px;
    height: auto;
    min-height: 220px;
    font-family: 'Roboto', sans-serif;
}

.checklist-section-heading {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    font-style: normal;
    color: #204E34;
    margin: 0 0 8px 0;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-overview-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #111827;
    margin: 0;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-pdf-link {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #204E34;
    text-decoration: underline;
    margin-top: 4px;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-pdf-link:hover {
    color: #1a3f29;
}

.pdf-viewer-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.pdf-viewer {
    width: 766px;
    height: 485px;
    min-height: 485px;
    border: 1px solid #E5E5E5;
    border-width: 1px;
    border-radius: 4px;
    background: #f5f5f5;
    display: block;
}

/* Ensure PDF displays in reading view without sidebar */
.pdf-viewer-container {
    position: relative;
}

.pdf-viewer-container::before {
    content: '';
    display: none;
}

.checklist-summary,
.checklist-recommendations,
.checklist-posted-comments,
.checklist-form-letters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Roboto', sans-serif;
}

.checklist-list,
.checklist-numbered-list {
    margin: 0;
    padding-left: 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #111827;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-list li,
.checklist-numbered-list li {
    margin-bottom: 8px;
}

.checklist-numbered-list {
    list-style-type: decimal;
}

.checklist-nested-list {
    margin: 8px 0 8px 20px;
    padding-left: 20px;
    list-style-type: disc;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-posted-comments p,
.checklist-form-letters p {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-disclaimer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    font-family: 'Roboto', sans-serif;
}

.checklist-disclaimer-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    color: #6B7280;
    margin: 0;
    line-height: 22px;
    letter-spacing: 0%;
}

.checklist-disclaimer-text strong {
    font-weight: 700;
    color: #374151;
}

.checklist-disclaimer-text small {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 22px;
    letter-spacing: 0%;
}

/* Responsive adjustments for checklist modal */
@media (max-width: 1024px) {
    #checklist-modal .modal-content {
        width: 95%;
        max-width: 880px;
        max-height: 95vh;
    }
    
    .checklist-content {
        max-width: 100%;
    }
    
    .pdf-viewer {
        height: 500px;
        min-height: 500px;
    }
}

@media (max-width: 968px) {
    #checklist-modal .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .checklist-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Make all modals full-screen on mobile */
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 1px solid #E5E5E5;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #checklist-modal .modal-content {
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    #checklist-modal .modal-header {
        padding: 1rem;
    }
    
    #checklist-modal .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 80px);
    }
    
    .checklist-content {
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .checklist-title,
    #checklist-modal .modal-title {
        font-size: 1.25rem;
    }
    
    .checklist-subtitle {
        font-size: 0.875rem;
    }
    
    .pdf-viewer {
        width: 100% !important;
        height: 300px !important;
        min-height: 300px !important;
    }
    
    .checklist-list,
    .checklist-numbered-list {
        padding-left: 1.25rem;
    }
    
    .checklist-overview {
        width: 100% !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-main-column {
        width: 100%;
        max-width: 100%;
    }
    
    .form-sidebar-column {
        width: 100%;
        max-width: 100%;
        order: -1; /* Move sidebar up on mobile */
    }
    
    .sidebar-card,
    .map-card,
    .contact-card {
        width: 100%;
        max-width: 100%;
    }
    
    .legal-notice-box {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .breadcrumb-bar {
        height: auto;
        padding: 12px 1rem;
        min-height: 44px;
        width: 100%;
    }
    
    .breadcrumb-content {
        font-size: 12px;
        gap: 8px;
        flex-wrap: wrap;
        line-height: 1.4;
    }
    
    .breadcrumb-link,
    .breadcrumb-separator,
    .breadcrumb-current {
        font-size: 12px;
    }
    
    .submit-form-page {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .legal-notice-box {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }
    
    .notice-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .notice-title {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .notice-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .notice-btn {
        width: 100%;
        min-height: 44px;
        padding: 0.75rem 1rem;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .identification-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .id-card-content {
        padding: 1.5rem;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-header {
        margin-bottom: 1.5rem;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .project-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
    
    .project-hierarchy {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .comment-textarea {
        font-size: 16px; /* Prevent iOS auto-zoom */
        min-height: 200px;
        padding: 1rem;
    }
    
    .form-input,
    .form-select {
        font-size: 16px; /* Prevent iOS auto-zoom */
        min-height: 44px; /* Touch-friendly */
        padding: 0.75rem 2.5rem 0.75rem 1rem; /* Extra padding-right for dropdown arrow */
    }
    
    .form-select {
        background-position: right 1rem center;
        background-size: 14px;
    }
    
    .upload-dropzone {
        padding: 2rem 1rem;
    }
    
    .submit-btn-black {
        width: 100%;
        min-height: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 16px;
    }
    
    .upload-action-content {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
        font-size: 16px;
    }
    
    .switch-to-text-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 16px;
    }
    
    .map-card {
        height: 300px;
        min-height: 300px;
    }
    
    .contact-card {
        height: auto;
        min-height: auto;
    }
    
    .sidebar-column {
        width: 100%;
        max-width: 100%;
    }
    
    .form-layout {
        width: 100%;
        max-width: 100%;
    }
}

/* Additional responsive fixes for very small screens */
@media (max-width: 480px) {
    .breadcrumb-bar {
        padding: 10px 0.75rem;
    }
    
    .breadcrumb-content {
        font-size: 11px;
        gap: 6px;
    }
    
    .breadcrumb-link,
    .breadcrumb-separator,
    .breadcrumb-current {
        font-size: 11px;
    }
    
    .project-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    .section-title-large {
        font-size: 1.125rem;
    }
    
    .section-label {
        font-size: 1rem;
    }
    
    .id-desc {
        font-size: 12px;
    }
}

/* Mobile-specific styles (max-width: 480px) */
@media (max-width: 480px) {
    .submit-form-page {
        padding: 0.75rem;
    }
    
    .breadcrumb-bar {
        padding: 10px 0.75rem;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .section-title-large {
        font-size: 1.125rem;
    }
    
    .section-label {
        font-size: 1rem;
    }
    
    .legal-notice-box {
        padding: 0.75rem;
    }
    
    .notice-title {
        font-size: 14px;
    }
    
    .comment-textarea {
        min-height: 150px;
        padding: 0.875rem;
    }
    
    .id-card-content {
        padding: 1rem;
    }
    
    .id-icon-circle {
        width: 48px;
        height: 48px;
    }
    
    .map-card {
        height: 250px;
        min-height: 250px;
    }
}
