:root { color-scheme: light; font-family: Arial, sans-serif; color: #172a45; background: #fff; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #213249; color: #fff; padding: 16px 30px; }
h1 { font-size: 25px; font-weight: 700; margin: 0; line-height: 1.2; }
h2 { font-size: 25px; line-height: 1.3; margin: 0 0 8px; }
p { line-height: 1.5; margin: 0 0 16px; }
.workspace { display: grid; grid-template-columns: minmax(300px, 26vw) minmax(0, 1fr); min-height: calc(100vh - 62px); }
aside { border-right: 1px solid #dce2eb; padding: 32px 25px 40px 30px; }
main { padding: 32px 30px 40px 34px; min-width: 0; outline: none; }
.muted, .hint, .notice { color: #516480; }
.hint { font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, select, input[type=file] { border: 1px solid #cbd5e2; border-radius: 4px; color: inherit; background: #f8f9fb; }
button { cursor: pointer; padding: 14px 18px; min-height: 48px; }
button:hover { background: #edf1f7; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #6ba1ef; outline-offset: 3px; }
form button { display: block; width: 100%; margin-top: 14px; }
.primary { background: #1666e9; color: #fff; border-color: #1666e9; }
.primary:hover { background: #0d54c8; }
input[type=file] { width: 100%; min-width: 0; padding: 8px; line-height: 30px; }
input[type=file]::file-selector-button { padding: 6px 9px; margin-right: 9px; border: 1px solid #c3ccd9; border-radius: 3px; background: #e9edf3; color: #172a45; cursor: pointer; }
#limits { margin: 10px 0 0; }
.configuration { margin-top: 34px; }
.configuration select { width: 100%; min-width: 0; }
dl { margin: 16px 0; }
.configuration dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 14px 14px; }
dt, dd { margin: 0; }
.configuration output { display: block; padding: 13px 11px; border: 1px solid #cbd5e2; border-radius: 4px; overflow-wrap: anywhere; background: #fbfcfd; line-height: 1.25; }
.notice { border-top: 1px solid #dce2eb; padding-top: 30px; margin: 32px 0 0; font-size: 14px; }
.page-picker { display: flex; align-items: center; gap: 20px; margin: 16px 0 22px; }
select { padding: 11px 14px; min-height: 44px; }
.tabs { display: flex; border-bottom: 1px solid #dce2eb; margin-bottom: 22px; gap: 4px; }
.tabs button { background: transparent; border: none; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 20px 13px; }
.tabs [aria-selected=true] { color: #1260dd; border-bottom-color: #1666e9; font-weight: 700; }
.box-toggle { display: flex; gap: 10px; align-items: center; cursor: pointer; }
input[type=checkbox] { accent-color: #1666e9; width: 20px; height: 20px; margin: 0; }
.box-hint { margin: 8px 0 12px 30px; }
.line { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0 18px; border-bottom: 1px solid #dce2eb; }
.line-body { min-width: 0; }
.line-text { font-size: 21px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; width: fit-content; max-width: 100%; unicode-bidi: plaintext; }
.line-text:dir(rtl) { font-family: Tahoma, Arial, sans-serif; font-weight: 600; font-size: 22px; }
.confidence { color: #516480; white-space: nowrap; font-size: 17px; padding-top: 6px; }
.box, .metadata { font-family: Consolas, "Courier New", monospace; font-size: 14px; }
.box { color: #516480; margin-top: 3px; overflow-wrap: anywhere; line-height: 1.5; }
.hide-boxes .box { display: none; }
details { padding-top: 20px; }
summary { cursor: pointer; font-size: 20px; font-weight: 700; }
.metadata { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 24px; line-height: 1.35; margin-left: 30px; font-size: 15px; }
.metadata dd { overflow-wrap: anywhere; }
pre { background: #f5f7fa; border: 1px solid #dce2eb; border-radius: 4px; padding: 20px; max-height: 540px; overflow: auto; font-size: 14px; line-height: 1.5; }
.error { color: #a51d2d; background: #fff4f4; padding: 16px; border-left: 3px solid #a51d2d; }
[hidden] { display: none !important; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.review-grid img, .review-grid iframe { width: 100%; max-height: 700px; object-fit: contain; border: 1px solid #dce2eb; }
.review-grid iframe { height: 600px; }
.review-field { padding: 14px 0; border-bottom: 1px solid #dce2eb; }
.review-field label { display: block; font-weight: bold; margin-bottom: 8px; }
.review-field p { margin-bottom: 6px; overflow-wrap: anywhere; }
.review-field input, .review-field textarea, #reviewer { width: 100%; padding: 10px; border: 1px solid #cbd5e2; border-radius: 4px; color: inherit; }
#reviewer { max-width: 360px; display: block; margin: 8px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.line-editor { max-width: 100%; overflow: auto; border: 1px solid #dce2eb; }
.line-editor table { border-collapse: collapse; width: 100%; min-width: 1900px; }
.line-editor th, .line-editor td { padding: 10px; text-align: start; vertical-align: top; border-bottom: 1px solid #dce2eb; }
.line-editor th { background: #f5f7fa; }
.line-editor input { width: 130px; padding: 9px; border: 1px solid #cbd5e2; border-radius: 4px; }
.line-editor td:first-child input { width: 220px; }
.line-editor .hint { max-width: 220px; overflow-wrap: anywhere; margin: 6px 0; }
#validation-review { padding: 16px; margin: 18px 0; background: #f5f7fa; border: 1px solid #dce2eb; }
#validation-issues { padding-left: 22px; line-height: 1.5; overflow-wrap: anywhere; }
.validation-error { color: #a51d2d; }
@media (max-width: 1000px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; left: 20px; padding: 12px; background: #fff; z-index: 1; }
.skip-link:focus { top: 10px; }
@media (max-width: 760px) {
  header { padding: 18px 20px; } h1 { font-size: 21px; } h2 { font-size: 23px; }
  .workspace { display: block; } aside { border-right: 0; border-bottom: 1px solid #dce2eb; padding: 26px 20px; }
  main { padding: 26px 20px; } .configuration { margin-top: 26px; }
  .configuration dl { grid-template-columns: 85px minmax(0, 1fr); }
  .notice { margin-top: 24px; padding-top: 20px; }
  .line { flex-direction: column; gap: 4px; } .line-text { font-size: 20px; }
  .metadata { margin-left: 0; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .metadata dt { margin-top: 8px; color: #516480; }
  .tabs button { padding-left: 12px; padding-right: 12px; }
}
