.search-interface{max-width:1200px;margin:2rem auto;padding:0 1rem}.search-form{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 2px 12px #00000014}.search-bar{display:flex;gap:1rem;margin-bottom:1rem}.search-input{flex:1;padding:.75rem 1rem;border:2px solid #e0e0e0;border-radius:8px;font-size:1rem;transition:border-color .2s}.search-input:focus{outline:none;border-color:#667eea}.search-button{padding:.75rem 2rem;background:#667eea;color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:background .2s}.search-button:hover{background:#5568d3}.search-controls{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}.filter-toggle{padding:.5rem 1rem;background:#f5f5f5;border:1px solid #ddd;border-radius:6px;cursor:pointer;font-size:.9rem;display:flex;align-items:center;gap:.5rem;transition:background .2s}.filter-toggle:hover{background:#e8e8e8}.filter-badge{background:#667eea;color:#fff;padding:.1rem .5rem;border-radius:12px;font-size:.75rem;font-weight:600}.sort-select{padding:.5rem 1rem;border:1px solid #ddd;border-radius:6px;font-size:.9rem;background:#fff;cursor:pointer}.clear-filters{padding:.5rem 1rem;background:#fee;color:#c00;border:1px solid #fcc;border-radius:6px;cursor:pointer;font-size:.9rem;transition:background .2s}.clear-filters:hover{background:#fdd}.filters-panel{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid #e0e0e0}.year-filters{margin-bottom:1.5rem}.year-filters h3{font-size:1rem;margin-bottom:.75rem;color:#555}.year-inputs{display:flex;align-items:center;gap:1rem}.year-input{width:120px;padding:.5rem;border:1px solid #ddd;border-radius:6px;font-size:.9rem}.category-group{margin-bottom:1.5rem}.category-group h3{font-size:1rem;margin-bottom:.75rem;color:#555}.category-chips{display:flex;flex-wrap:wrap;gap:.5rem}.category-chip{padding:.4rem .8rem;background:#f5f5f5;border:1px solid #ddd;border-radius:20px;font-size:.85rem;cursor:pointer;transition:all .2s}.category-chip:hover{background:#e8e8e8}.category-chip.active{background:#667eea;color:#fff;border-color:#667eea}@media (max-width: 768px){.search-bar{flex-direction:column}.search-button{width:100%}.year-inputs{flex-direction:column;align-items:stretch}.year-input{width:100%}}.results-section{max-width:1200px;margin:2rem auto;padding:0 1rem}.results-header{margin-bottom:1.5rem}.results-count{color:#666;font-size:.95rem}.results-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem;margin-bottom:2rem}.person-card{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 2px 12px #00000014;cursor:pointer;transition:all .2s;display:flex;flex-direction:column;gap:.75rem}.person-card:hover{transform:translateY(-4px);box-shadow:0 4px 20px #0000001f}.person-card-header{border-bottom:1px solid #f0f0f0;padding-bottom:.75rem}.person-name{font-size:1.2rem;font-weight:600;color:#333;margin-bottom:.25rem}.person-name-greek{font-size:1rem;color:#667eea;font-style:italic;margin-top:.25rem}.person-dates{font-size:.9rem;color:#888;font-weight:500}.person-description{font-size:.9rem;color:#555;line-height:1.5;flex:1}.person-categories{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;border-top:1px solid #f0f0f0}.category-tag{padding:.25rem .6rem;background:#f0f0ff;color:#667eea;border-radius:12px;font-size:.75rem;font-weight:500}.pagination{display:flex;justify-content:center;align-items:center;gap:2rem;margin:2rem 0}.pagination-button{padding:.75rem 1.5rem;background:#667eea;color:#fff;border:none;border-radius:8px;font-size:1rem;cursor:pointer;transition:background .2s}.pagination-button:hover:not(:disabled){background:#5568d3}.pagination-button:disabled{background:#ccc;cursor:not-allowed}.pagination-info{font-size:.95rem;color:#666}.no-results{text-align:center;padding:4rem 2rem;background:#fff;border-radius:12px;max-width:600px;margin:2rem auto}.no-results p{color:#666;font-size:1.1rem}@media (max-width: 768px){.results-grid{grid-template-columns:1fr}.pagination{gap:1rem}.pagination-button{padding:.6rem 1rem;font-size:.9rem}}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0009;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:1000;animation:fadeIn .2s}.modal-content{background:#fff;border-radius:16px;max-width:800px;width:100%;max-height:90vh;overflow-y:auto;position:relative;animation:slideUp .3s;box-shadow:0 20px 60px #0000004d}@keyframes slideUp{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.close-button{position:sticky;top:1rem;float:right;background:#f5f5f5;border:none;width:40px;height:40px;border-radius:50%;font-size:1.5rem;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:10;transition:background .2s}.close-button:hover{background:#e0e0e0}.person-detail{padding:2rem}.person-detail-header{margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:2px solid #f0f0f0}.person-detail-header h2{font-size:2rem;color:#333;margin-bottom:.5rem}.greek-name{font-size:1.5rem;color:#667eea;font-style:italic;margin-bottom:.5rem}.dates{font-size:1.1rem;color:#888;font-weight:500}.detail-section{margin-bottom:2rem}.detail-section h4{font-size:1.2rem;color:#667eea;margin-bottom:1rem;font-weight:600}.description-text,.comments-text{font-size:1rem;line-height:1.7;color:#444;white-space:pre-wrap}.categories-list{display:flex;flex-direction:column;gap:1rem}.category-type-group{display:flex;flex-direction:column;gap:.5rem}.category-type-group strong{color:#555;font-size:.95rem}.category-tags{display:flex;flex-wrap:wrap;gap:.5rem}.category-tags .category-tag{padding:.4rem .8rem;background:#f0f0ff;color:#667eea;border-radius:16px;font-size:.85rem;font-weight:500}.links{display:flex;flex-direction:column;gap:.75rem}.external-link{display:inline-block;padding:.75rem 1.25rem;background:#667eea;color:#fff;text-decoration:none;border-radius:8px;font-weight:500;transition:background .2s;text-align:center}.external-link:hover{background:#5568d3}.show-references-button{width:100%;padding:1rem 1.5rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 2px 8px #667eea4d}.show-references-button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #667eea66}@media (max-width: 768px){.modal-content{max-height:95vh;border-radius:12px}.person-detail{padding:1.5rem}.person-detail-header h2{font-size:1.5rem}.greek-name{font-size:1.2rem}.dates{font-size:1rem}}.reference-panel-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000004d;z-index:2000;animation:fadeIn .2s}.reference-panel{position:fixed;top:0;right:0;bottom:0;width:500px;max-width:90vw;background:#fff;box-shadow:-4px 0 20px #0003;display:flex;flex-direction:column;animation:slideInRight .3s;overflow:hidden}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.reference-panel-header{padding:1.5rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.reference-panel-header h2{margin:0;font-size:1.5rem;font-weight:600}.reference-panel-header .close-button{background:#fff3;border:none;color:#fff;width:36px;height:36px;border-radius:50%;font-size:1.8rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s;line-height:1}.reference-panel-header .close-button:hover{background:#ffffff4d}.reference-panel-content{flex:1;overflow-y:auto;padding:1.5rem}.person-info{margin-bottom:1.5rem;padding-bottom:1.5rem;border-bottom:2px solid #f0f0f0}.person-info h3{margin:0 0 .5rem;font-size:1.3rem;color:#333}.person-info .greek-name{color:#667eea;font-size:1rem;font-style:italic;margin:0 0 .75rem}.person-info .reference-count{color:#666;font-size:.95rem;margin:0;font-weight:500}.no-references{text-align:center;padding:3rem 2rem;color:#999}.references-list{display:flex;flex-direction:column;gap:2rem}.text-group{background:#f8f8f8;border-radius:8px;padding:1rem}.text-group-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid #e0e0e0}.text-group-header h4{margin:0;font-size:1.1rem;color:#667eea;font-weight:600;flex:1}.ref-count-badge{background:#667eea;color:#fff;padding:.25rem .75rem;border-radius:12px;font-size:.85rem;font-weight:600}.text-references{display:flex;flex-direction:column;gap:1rem}.reference-item{background:#fff;border-radius:6px;padding:1rem;border-left:3px solid #667eea;box-shadow:0 1px 3px #0000000d}.reference-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.reference-header-left{display:flex;align-items:center;gap:.5rem}.reference-header-right{display:flex;align-items:center}.page-number{font-weight:600;color:#333;font-size:.9rem}.marginalia-badge{background:#ff9800;color:#fff;padding:.2rem .6rem;border-radius:4px;font-size:.75rem;font-weight:600;text-transform:uppercase}.view-page-link{color:#667eea;text-decoration:none;font-size:.85rem;font-weight:500;padding:.25rem .5rem;border-radius:4px;transition:background .2s}.view-page-link:hover{background:#667eea1a;text-decoration:underline}.reference-item.is-marginalia{border-left-color:#ff9800;background:#fffaf0}.match-score{background:#f0f0ff;color:#667eea;padding:.2rem .6rem;border-radius:4px;font-size:.8rem;font-weight:500}.reference-snippet{font-size:.95rem;line-height:1.6;color:#444;margin-bottom:.5rem;white-space:pre-wrap;word-wrap:break-word}.reference-snippet .highlight{background:#fff4cc;color:#333;padding:.1rem .2rem;border-radius:2px;font-weight:600}.matched-as{font-size:.85rem;color:#888;font-style:italic}.matched-as strong{color:#667eea;font-style:normal}@media (max-width: 768px){.reference-panel{width:100%;max-width:100vw}.reference-panel-header h2{font-size:1.2rem}.reference-panel-content{padding:1rem}.person-info h3{font-size:1.1rem}.text-group,.reference-item{padding:.75rem}}.app{min-height:100vh;background:#f5f5f5}.app-header{background:#f5f5f5;border-bottom:1px solid #ddd;box-shadow:0 1px 3px #00000014}.header-content{display:flex;align-items:center;padding:1rem 2rem;gap:3rem}.site-title{font-size:1.5rem;font-weight:700;color:#333;margin:0}.app-nav{display:flex;align-items:center;gap:2rem}.subtitle{font-size:1.1rem;opacity:.9}.nav-link{color:#333;text-decoration:none;font-size:1rem;font-weight:400;transition:color .2s ease}.nav-link:hover{color:#667eea}.nav-link.active{font-weight:700;color:#000}.error-message{max-width:1200px;margin:2rem auto;padding:1rem;background:#fee;border:1px solid #fcc;border-radius:8px;color:#c00;text-align:center}.loading{text-align:center;padding:4rem;font-size:1.2rem;color:#666}@media (max-width: 768px){.header-content{flex-direction:column;align-items:flex-start;gap:1rem;padding:1rem}.site-title{font-size:1.25rem}.app-nav{gap:1.5rem}.subtitle{font-size:1rem}}.document-viewer{display:flex;flex-direction:column;height:100vh;background:#f5f5f5}.viewer-header{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:1rem 2rem;box-shadow:0 2px 8px #0000001a}.header-content{max-width:1800px;margin:0 auto}.header-content h2{margin:0 0 1rem;font-size:1.5rem}.header-controls{display:flex;gap:2rem;align-items:center;flex-wrap:wrap}.document-selector{padding:.5rem 1rem;border:none;border-radius:6px;background:#fffffff2;font-size:.95rem;cursor:pointer;min-width:200px}.page-navigation{display:flex;gap:1rem;align-items:center}.page-navigation button{padding:.5rem 1rem;border:1px solid rgba(255,255,255,.3);border-radius:6px;background:#ffffff26;color:#fff;cursor:pointer;font-size:.95rem;transition:background .2s}.page-navigation button:hover:not(:disabled){background:#ffffff40}.page-navigation button:disabled{opacity:.5;cursor:not-allowed}.page-indicator{color:#fff;font-weight:500}.viewer-content{display:flex;flex:1;gap:1px;background:#e0e0e0;overflow:hidden}.image-panel,.original-panel,.editable-panel{background:#fff;display:flex;flex-direction:column;overflow:hidden}.image-panel{flex:0 0 40%;position:relative}.original-panel{flex:0 0 30%;background:#f8f8f8}.editable-panel{flex:0 0 30%}.image-panel h3,.original-panel h3,.editable-panel h3{margin:0;padding:1rem 1.5rem;background:#f5f5f5;border-bottom:1px solid #e0e0e0;font-size:.95rem;font-weight:600;color:#333}.image-panel{padding:1rem}.image-container{position:relative;width:100%;height:calc(100% - 4.5rem);display:flex;align-items:center;justify-content:center}.page-image{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}.line-overlay{position:absolute;pointer-events:all}.line-polygon{cursor:pointer;transition:all .15s ease}.line-polygon.hovered{filter:drop-shadow(0 0 4px rgba(255,0,0,.6))}.no-image{display:flex;align-items:center;justify-content:center;height:100%;color:#999}.text-content{flex:1;overflow-y:auto;padding:1.5rem;line-height:1.8;color:#333}.greek-text{font-family:Times New Roman,Palatino Linotype,Georgia,serif;font-size:16px;direction:ltr}.text-line{padding:.35rem 0;cursor:pointer;transition:background-color .15s ease;border-radius:4px;margin:-.35rem 0}.text-line.highlighted{background-color:#fff3cd;padding-left:.5rem;padding-right:.5rem;margin-left:-.5rem;margin-right:-.5rem}.correction-selector{padding:1rem 1.5rem;background:#f0f8ff;border-bottom:1px solid #e0e0e0;display:flex;flex-direction:column;gap:.5rem}.correction-selector label{font-weight:600;font-size:.9rem;color:#333}.correction-dropdown{width:100%;padding:.5rem;border:2px solid #667eea;border-radius:6px;background:#fff;font-size:.9rem;font-family:monospace}.correction-info{padding:.5rem;background:#667eea1a;border-radius:4px;color:#555;font-size:.85rem}.correction-info small{line-height:1.6}.version-selector{padding:1rem 1.5rem;background:#f5f5f5;border-bottom:1px solid #e0e0e0;display:flex;align-items:center;gap:.75rem}.version-selector label{font-weight:500;font-size:.9rem}.version-selector select{flex:1;padding:.5rem;border:1px solid #ddd;border-radius:6px;background:#fff;font-size:.9rem}.editable-textarea{flex:1;padding:1.5rem;border:none;resize:none;line-height:1.8;font-size:16px}.editable-textarea:focus{outline:none}.save-controls{padding:1rem 1.5rem;background:#f5f5f5;border-top:1px solid #e0e0e0;display:flex;gap:.75rem}.save-button{padding:.75rem 1.5rem;border:none;border-radius:6px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:.95rem;font-weight:500;cursor:pointer;transition:opacity .2s}.save-button:hover:not(:disabled){opacity:.9}.save-button:disabled{opacity:.5;cursor:not-allowed}.viewer-loading,.viewer-error{display:flex;align-items:center;justify-content:center;height:100vh;font-size:1.25rem;color:#666}.viewer-error{color:#fc8181}.error-toast{position:fixed;bottom:2rem;right:2rem;padding:1rem 1.5rem;background:#fc8181;color:#fff;border-radius:8px;box-shadow:0 4px 12px #00000026;animation:slideIn .3s ease-out}@keyframes slideIn{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@media (max-width: 1200px){.viewer-content{flex-direction:column}.image-panel,.original-panel,.editable-panel{flex:1 1 auto;min-height:400px}}@media (max-width: 768px){.viewer-header{padding:1rem}.header-content h2{font-size:1.25rem}.header-controls{flex-direction:column;align-items:stretch;gap:1rem}.document-selector{width:100%}.page-navigation{justify-content:space-between}.image-panel,.original-panel,.editable-panel{min-height:300px}}
