
body { font-family: Arial, sans-serif; background:#f7f7f7; color:#111; }
main { max-width: 980px; margin: auto; background:#fff; padding:20px; }
section { margin-bottom: 40px; }
h1, h2 { border-bottom: 2px solid #ddd; padding-bottom: 5px; }

header{max-width:980px;margin:24px auto 0 auto;background:#fff;padding:18px 20px;border-radius:12px;border:1px solid #e6e6e6;}
header h1{margin:0 0 6px 0;}
.subtitle{margin:0 0 10px 0;color:#333;}
nav.lang a{margin-right:10px;text-decoration:none;color:#0b57d0;}
nav.lang{margin-top:8px}
.toc{max-width:980px;margin:14px auto;background:#fff;padding:18px 20px;border-radius:12px;border:1px solid #e6e6e6;}
.specbox{border:1px solid #e6e6e6;border-radius:12px;padding:12px 14px;background:#fafafa;margin:10px 0 12px 0;}
.keyline{padding:10px 12px;border-left:4px solid #d93025;background:#fff4f4;border-radius:8px;}
.placeholders{border:1px dashed #bbb;border-radius:10px;padding:10px 12px;background:#fcfcfc;margin:10px 0}
table.ovd{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #e6e6e6;border-radius:12px;overflow:hidden;margin-top:10px}
table.ovd th, table.ovd td{padding:10px 10px;border-bottom:1px solid #eee;border-right:1px solid #eee;vertical-align:top}
table.ovd th{background:#fafafa;font-weight:700;text-align:left}
table.ovd tr:last-child td{border-bottom:none}
table.ovd th:last-child, table.ovd td:last-child{border-right:none}
.ok{color:#1e8e3e;font-weight:700}
.bad{color:#d93025;font-weight:700}
.warn{color:#b06000;font-weight:700}
.note{color:#333}
.quote{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}

/* Document thumbnails (spec + invoice) */
.specbox { margin-top: 12px; }
.specbox .docrow { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.specbox .docitem { flex: 1 1 320px; min-width: 260px; }
img.docthumb { width: 100%; max-width: 360px; height: auto; display: block; border-radius: 10px; border: 1px solid #d9d9d9; box-shadow: 0 1px 8px rgba(0,0,0,.06); }

.docnote { font-size: .92rem; color: #555; margin-top: 6px; }

/* ---------------- Lightbox (assets/lightbox.js) ---------------- */
.lb-backdrop{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.86);
  z-index: 9999;
  padding: 20px;
}

.lb-inner{
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-img{
  width: 100%;
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.lb-caption{
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  opacity: .9;
  padding: 0 4px;
}

.lb-close{
  position: fixed;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.lb-close:hover{ background: rgba(0,0,0,.55); }

/* ---------------- Lightbox (assets/lightbox.js) ---------------- */
.lb-backdrop{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.86);
  z-index: 9999;
  padding: 20px;
}
.lb-inner{
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lb-img{
  max-width: min(1200px, 96vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 50px rgba(0,0,0,.45);
  background: #111;
}
.lb-caption{color: rgba(255,255,255,.9);font-size: 14px;line-height: 1.35;}
.lb-close{
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.lb-close:hover{background: rgba(0,0,0,.55);}

@media (max-width: 520px){
  .lb-img{max-height: 80vh;border-radius: 12px;}
}

/* --- Thumbnails (click to enlarge) --- */
a.thumb{display:inline-block;vertical-align:top;text-decoration:none;}
img.thumb{width:160px;max-width:160px;height:auto;border-radius:10px;border:1px solid #e5e7eb;box-shadow:0 2px 10px rgba(0,0,0,.06);transition:transform .15s ease, box-shadow .15s ease;}
a.thumb:hover img.thumb{transform:translateY(-1px) scale(1.02);box-shadow:0 10px 25px rgba(0,0,0,.10);}
.figure{margin:14px 0;}
.figure .caption{font-size:13px;color:#6b7280;margin-top:8px;}
.gallery{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start;}

/* --- Robust lightbox (no external deps) --- */
.lightbox-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.72);z-index:9999;padding:24px;}
.lightbox-overlay.open{display:flex;}
.lightbox-panel{position:relative;max-width:min(1100px,96vw);max-height:92vh;}
.lightbox-img{max-width:100%;max-height:92vh;border-radius:14px;box-shadow:0 25px 70px rgba(0,0,0,.35);background:#fff;}
.lightbox-close{position:absolute;top:-12px;right:-12px;width:40px;height:40px;border-radius:999px;border:1px solid rgba(255,255,255,.35);background:rgba(17,24,39,.75);color:#fff;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.lightbox-close:hover{background:rgba(17,24,39,.9);}

/* --- Thumbnails (click to enlarge) --- */
a.thumb{display:inline-block;vertical-align:top;text-decoration:none;}
img.thumb{width:160px;max-width:160px;height:auto;border-radius:10px;border:1px solid #e5e7eb;box-shadow:0 2px 10px rgba(0,0,0,.06);transition:transform .15s ease, box-shadow .15s ease;}
a.thumb:hover img.thumb{transform:translateY(-1px) scale(1.02);box-shadow:0 10px 25px rgba(0,0,0,.10);}
.figure{margin:14px 0;}
.figure .caption{margin-top:8px;font-size:0.93rem;color:#4b5563;}
.thumb-grid{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;}

/* --- Robust lightbox (no external deps) --- */
.lightbox-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.78);z-index:9999;padding:20px;}
.lightbox-overlay.open{display:flex;}
.lightbox-content{position:relative;max-width:min(1100px, 96vw);max-height:92vh;}
.lightbox-img{display:block;max-width:100%;max-height:92vh;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.45);}
.lightbox-close{position:absolute;top:-14px;right:-14px;width:38px;height:38px;border-radius:999px;border:0;background:#ffffff;color:#111827;font-size:22px;line-height:38px;cursor:pointer;box-shadow:0 10px 25px rgba(0,0,0,.25);}
.lightbox-close:hover{transform:scale(1.03);}

/* --- Lightbox overlay --- */
.lightbox-overlay{position:fixed;inset:0;background:rgba(0,0,0,.72);display:none;align-items:center;justify-content:center;z-index:9999;padding:24px;}
.lightbox-overlay.open{display:flex;}
.lightbox-content{position:relative;max-width:min(1100px, 96vw);max-height:92vh;}
.lightbox-img{display:block;max-width:96vw;max-height:92vh;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.35);}
.lightbox-close{position:absolute;top:-12px;right:-12px;width:42px;height:42px;border-radius:999px;border:0;background:rgba(255,255,255,.92);color:#111;font-size:26px;line-height:42px;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.25);}
.lightbox-close:hover{background:#fff;}

/* --- FIX: ensure thumbnail sizing applies even when <img> doesn't have class="thumb" --- */
a.thumb{max-width:160px;}
a.thumb img{width:160px !important; max-width:160px !important; height:auto !important; display:block; border-radius:10px; border:1px solid #e5e7eb; box-shadow:0 2px 10px rgba(0,0,0,.06);}
a.thumb:hover img{transform:translateY(-1px) scale(1.02); box-shadow:0 10px 25px rgba(0,0,0,.10);}
@media (max-width:520px){
  a.thumb{max-width:120px;}
  a.thumb img{width:120px !important; max-width:120px !important;}
}
