* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Outfit", "Nirmala UI", "Kohinoor Devanagari", "Kohinoor Bangla", sans-serif;
  color: #1f1a17;
  background: #f4efe8;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #241c18;
  color: #f7f1ea;
}
.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.brand h1 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 560; letter-spacing: -0.02em; }
.doc-title { font-size: 14px; color: #d9cfc4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.controls label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #e7ddd3; }
.controls select, .controls input[type="search"], .controls button, #backBtn {
  font: inherit;
  border: 1px solid #5c5148;
  background: #342922;
  color: #f7f1ea;
  border-radius: 999px;
  padding: 7px 12px;
}
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
.progress { font-size: 13px; min-width: 52px; text-align: center; }
.check { user-select: none; }
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px 1fr 1.15fr; }
.sidebar { overflow: auto; border-right: 1px solid #e6ddd3; background: #fffcf8; }
.sidebar-head { position: sticky; top: 0; padding: 14px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8a7b6e; background: #fffcf8; border-bottom: 1px solid #e6ddd3; }
#docList { list-style: none; margin: 0; padding: 0; }
#docList li {
  padding: 12px 16px;
  border-bottom: 1px solid #f1ebe4;
  cursor: pointer;
  font-size: 14px;
}
#docList li:hover { background: #faf6f1; }
#docList li.active { background: #efe4d4; }
#docList .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#docList .meta { display: block; margin-top: 2px; color: #6b7280; font-size: 11px; }
.image-pane, .compare-pane { min-width: 0; min-height: 0; overflow: auto; }
.image-pane { background: #e7e0d6; padding: 16px; }
.image-wrap { position: relative; display: inline-block; max-width: 100%; background: #fff; }
#pageImage { display: block; max-width: 100%; height: auto; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.box { fill: rgba(37, 99, 235, 0.08); stroke: #2563eb; stroke-width: 2; cursor: pointer; }
.box.changed { fill: rgba(217, 119, 6, 0.12); stroke: #d97706; }
.box.active { fill: rgba(22, 163, 74, 0.16); stroke: #15803d; stroke-width: 3; }
.box-label { font-size: 14px; font-weight: 700; fill: #fff; pointer-events: none; }
.empty { color: #6b7280; padding: 16px; }
.compare-pane { background: #fffcf8; border-left: 1px solid #e6ddd3; }
.summary { position: sticky; top: 0; z-index: 2; padding: 16px 18px; background: #fffcf8; border-bottom: 1px solid #e6ddd3; font-size: 14px; }
.summary strong { font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 560; }
.summary .sub { color: #6f6258; margin-top: 4px; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 42px 1fr 1fr; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eef0f3; cursor: pointer; }
.row.full { grid-template-columns: 1fr 1fr; cursor: default; align-items: start; gap: 20px; padding: 18px; }
.row.full:hover { background: transparent; }
.row:hover, .row.active { background: #faf6f1; }
.row.changed { background: transparent; }
.row.active.changed { background: #faf6f1; }
.num { font-weight: 700; color: #374151; }
.col h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a7b6e; font-weight: 600; }
.text { white-space: pre-wrap; font-size: 16px; line-height: 1.6; }
.del { background: #fecaca; text-decoration: line-through; }
.ins { background: #bbf7d0; }
.missing { color: #9ca3af; font-style: italic; }
.blocks { padding: 12px; }
.blocks h2 { margin: 8px 0; font-size: 14px; }
.block-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.block-card .label { font-size: 12px; font-weight: 700; color: #2563eb; }
.block-card .text { margin-top: 4px; }

.view { flex: 1; min-height: 0; overflow: auto; background: #f4efe8; }
.view-inner { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.home-inner { max-width: 920px; }
.report-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.report-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: #fffcf8;
  border: 1px solid #e6ddd3;
  border-radius: 18px;
  padding: 22px 20px 24px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-height: 210px;
}
.report-card:hover { border-color: #c4a484; background: #fff; }
.report-card p { margin: 0; color: #6f6258; font-size: 15px; line-height: 1.5; }
.about {
  margin-top: 28px;
  background: #fffcf8;
  border: 1px solid #e6ddd3;
  border-radius: 18px;
  padding: 26px 28px 12px;
}
.about-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.about h2 { font-size: 28px; margin-bottom: 14px; }
.about p { margin: 0 0 14px; color: #3f342e; font-size: 16px; line-height: 1.65; }
.about strong { font-weight: 600; color: #1f1a17; }
.site-link { color: #9a3412; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.embed-view { display: flex; flex-direction: column; background: #f4efe8; }
.embed-view iframe { flex: 1; width: 100%; border: 0; background: #f4efe8; }
.section-title { margin-top: 36px; font-size: 32px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 28px; }
.metric { background: #fffcf8; border: 1px solid #e6ddd3; border-radius: 14px; padding: 14px 16px; }
.metric-label { color: #8a7b6e; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.metric-value { margin-top: 6px; font-family: "Fraunces", Georgia, serif; font-size: 28px; font-weight: 560; }
.method { background: #fffcf8; border: 1px solid #e6ddd3; border-radius: 16px; padding: 18px 20px 8px; margin-bottom: 8px; }
.method h3 { margin: 0 0 8px; font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 560; }
.method a { color: #9a3412; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.method p { margin: 0 0 14px; color: #3f342e; line-height: 1.55; }
.defs { margin: 0; display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
.defs dt { margin: 0; color: #8a7b6e; font-size: 13px; font-weight: 600; }
.defs dd { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.lang-table { display: flex; flex-direction: column; gap: 8px; }
.lang-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #fffcf8;
  border: 1px solid #e6ddd3;
  border-radius: 14px;
  padding: 14px 16px;
  color: inherit;
  font: inherit;
}
.lang-head { background: transparent; border: 0; padding: 0 16px 4px; color: #8a7b6e; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: default; }
button.lang-row { cursor: pointer; }
button.lang-row:hover { border-color: #c4a484; background: #fff; }
.lang-score { margin: 0 0 16px; color: #6f6258; font-size: 15px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7b6e; }
.view-inner h2 { margin: 0 0 10px; font-family: "Fraunces", Georgia, serif; font-size: 40px; font-weight: 560; letter-spacing: -0.03em; line-height: 1.1; }
.lead { margin: 0 0 28px; color: #6f6258; font-size: 16px; line-height: 1.5; }
.language-split { max-width: none; height: 100%; display: flex; flex-direction: column; padding: 20px 28px 24px; }
.text-back {
  align-self: flex-start;
  margin-bottom: 16px;
  font: inherit;
  font-weight: 500;
  color: #1f1a17;
  background: #fffcf8;
  border: 1px solid #e6ddd3;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.text-back:hover { border-color: #c4a484; }
.split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}
.concerns-col, .pages-col { min-height: 0; overflow: auto; padding-right: 4px; }
.language-split h2 { font-size: 32px; margin-bottom: 16px; }
.section h2 { margin-bottom: 16px; }
.folder-list { display: flex; flex-direction: column; gap: 10px; }
.folder-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fffcf8;
  border: 1px solid #e6ddd3;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  color: inherit;
  box-shadow: 0 1px 0 rgba(36, 28, 24, 0.03);
}
.folder-card:hover { border-color: #c4a484; background: #fff; }
.folder-mark {
  width: 36px;
  height: 28px;
  border-radius: 6px 8px 6px 6px;
  background: #efe4d4;
  border: 1px solid #d9c7b0;
  position: relative;
  flex-shrink: 0;
}
.folder-mark::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 16px;
  height: 8px;
  border-radius: 4px 4px 0 0;
  background: #e7d3b8;
  border: 1px solid #d9c7b0;
  border-bottom: 0;
}
.folder-name { font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 560; letter-spacing: -0.02em; }
.concerns { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.concerns li { background: #fffcf8; border: 1px solid #e6ddd3; border-left: 4px solid #b4532a; border-radius: 14px; padding: 16px 18px; }
.concerns strong { font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 560; }
.concerns p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: #3f342e; }
.examples { margin: 12px 0 0; padding-left: 18px; color: #5c5148; font-size: 14px; line-height: 1.5; }
.examples li { background: none; border: 0; border-radius: 0; padding: 3px 0; }
.page-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-list-head h2 { margin: 0; }
.page-list-head input { font: inherit; border: 1px solid #e6ddd3; border-radius: 999px; padding: 10px 14px; min-width: 200px; background: #fffcf8; color: #1f1a17; }
.page-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.page-list li { background: #fffcf8; border: 1px solid #e6ddd3; border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.page-list li:hover { border-color: #c4a484; background: #fff; }
.page-name { font-size: 16px; font-weight: 500; }
.page-empty { cursor: default; color: #6f6258; background: transparent; border: 0; }
.page-empty:hover { background: transparent; border-color: transparent; }
#backBtn { border-color: #5c5148; }
@media (max-width: 900px) {
  .view-inner h2, .language-split h2, .section-title { font-size: 32px; }
  .metric-grid, .lang-row, .report-cards { grid-template-columns: 1fr; }
  .defs { grid-template-columns: 1fr; }
  .language-split { height: auto; }
  .split { grid-template-columns: 1fr; }
  .concerns-col, .pages-col { overflow: visible; }
  .page-list-head { flex-direction: column; align-items: stretch; }
  .row.full { grid-template-columns: 1fr; }
}
