:root{
  --bg:#070707; --panel:rgba(24,21,21,.96); --panel2:rgba(35,31,31,.96);
  --red:#db342a; --red2:#8e1713; --cream:#f2d79a; --text:#f7f4f2; --muted:#b8aaaa;
  --line:#4a2927; --blue:#2f76e9;
}
*{box-sizing:border-box} body{margin:0;background:#050505;color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif;min-height:100vh}
body:before{content:"";position:fixed;inset:72px 0 44px;z-index:-2;background-image:url("img/babayagabanner_2.png");background-size:cover;background-position:center center;background-repeat:no-repeat;background-color:#050505}
body:after{content:"";position:fixed;inset:72px 0 44px;z-index:-1;background:linear-gradient(90deg,rgba(0,0,0,.62),rgba(0,0,0,.16) 24%,rgba(0,0,0,.16) 76%,rgba(0,0,0,.62)),linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.18))}
.topbar{height:72px;background:rgba(22,22,22,.97);border-bottom:1px solid #211d1d}.topbar-inner{max-width:1120px;height:100%;margin:auto;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 24px}.brand{font-weight:700}.brand-mark{font-size:23px}.crest{width:58px;height:58px;display:grid;place-items:center;overflow:visible}.crest img{display:block;width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 2px 5px rgba(0,0,0,.65))}.auth-link{text-align:right;font-weight:650}
.page-shell{max-width:1050px;margin:28px auto 78px;padding:0 22px}.panel{background:var(--panel);border:1px solid rgba(95,53,48,.75);box-shadow:0 18px 70px rgba(0,0,0,.5);border-radius:4px}.intro-panel{padding:28px 30px;display:grid;grid-template-columns:1fr 360px;gap:28px}.eyebrow{color:var(--red);font-weight:800;letter-spacing:.13em;font-size:12px;margin:0 0 8px}.intro-panel h1{font-size:32px;margin:0 0 10px}.lede{color:var(--muted);line-height:1.55;max-width:620px}.warning{background:#e7cf91;color:#211c14;border-left:6px solid #e24b36;padding:16px 18px;display:flex;flex-direction:column;gap:7px;line-height:1.35;border-radius:3px;font-size:13px}.form-panel{margin-top:18px;padding:30px}.section-title{font-size:17px;font-weight:800}.hint{color:var(--muted);font-size:13px;margin-top:7px}.gap{margin-top:28px}.upload-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:16px}.file-card{background:var(--panel2);border:1px dashed #72504b;padding:18px;min-height:112px;display:flex;flex-direction:column;gap:10px;cursor:pointer}.file-card:hover{border-color:var(--red)}.period-card{border-style:solid;border-color:#6b3531}.file-card span{font-weight:750}.file-card small{color:var(--muted)}.file-card input{width:100%;font-size:12px}.date-row{display:flex;align-items:flex-end;gap:22px;margin:16px 0 26px}.date-field{display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--muted)}input[type=datetime-local]{padding:10px 12px;background:#f4f4f4;border:0;border-radius:3px;color:#111;min-width:250px}.check{display:flex;align-items:center;gap:8px;padding-bottom:10px}.primary{background:var(--blue);color:white;border:0;border-radius:4px;padding:11px 20px;font-weight:750;cursor:pointer}.primary:hover{filter:brightness(1.08)}.primary:disabled{opacity:.55;cursor:not-allowed}
.job{margin-top:28px;border-top:1px solid #3b2b29;padding-top:24px}.hidden{display:none!important}.progress-head{display:flex;justify-content:space-between;margin-bottom:8px;font-size:13px;color:var(--muted)}.progress-track{height:12px;border-radius:20px;background:#080808;overflow:hidden;border:1px solid #3d302e}#progress-bar{height:100%;width:0;background:linear-gradient(90deg,#8d1712,#e33a2e);transition:width .25s}.job-details{color:var(--muted);font-size:12px;margin-top:10px}.result-card{margin-top:18px;background:#151313;border:1px solid #47322f;padding:18px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}.metric{background:#211d1d;padding:12px}.metric b{display:block;font-size:18px;margin-top:4px}.metric span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em}.download{display:inline-block;background:#e43b2f;color:#fff;text-decoration:none;padding:10px 15px;border-radius:4px;font-weight:750}.error{white-space:pre-wrap;color:#ff9f96;background:#321513;padding:14px;border:1px solid #7a2d27}footer{position:fixed;bottom:0;left:0;right:0;background:#171717;height:44px;display:flex;align-items:center;padding-left:max(calc((100vw - 1050px)/2 + 22px),22px);font-size:12px;color:#ddd}
@media(max-width:800px){.intro-panel{grid-template-columns:1fr}.upload-grid{grid-template-columns:1fr}.date-row{align-items:flex-start;flex-direction:column}.metrics{grid-template-columns:1fr 1fr}.topbar-inner{padding:0 14px}.page-shell{padding:0 12px}.form-panel,.intro-panel{padding:20px}.auth-link{font-size:12px}}
.archive-panel{margin-top:18px;padding:24px 30px}.archive-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.archive-head h2{margin:0 0 4px;font-size:22px}.secondary{background:#2a2322;color:#fff;border:1px solid #6d4843;border-radius:4px;padding:10px 14px;font-weight:750;cursor:pointer;white-space:nowrap}.secondary:hover{border-color:var(--red);background:#332827}.secondary:disabled{opacity:.5;cursor:not-allowed}.archive-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:18px}.archive-stat{background:#211d1d;border:1px solid #3e302e;padding:12px;min-height:70px}.archive-stat span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em}.archive-stat b{display:block;margin-top:7px;font-size:14px;word-break:break-word}.archive-job{margin-top:18px;border-top:1px solid #3b2b29;padding-top:18px}#archive-progress-bar{height:100%;width:0;background:linear-gradient(90deg,#8d1712,#e33a2e);transition:width .25s}
@media(max-width:800px){.archive-head{flex-direction:column}.archive-stats{grid-template-columns:1fr 1fr}.secondary{width:100%}}
.result-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.secondary-download{background:#2a2322;border:1px solid #6d4843}.highlights-preview{margin-top:20px;border-top:1px solid #47322f;padding-top:18px}.highlights-preview-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:10px}.highlights-preview-head>div{display:flex;flex-direction:column;gap:4px}.highlights-preview-head span{color:var(--muted);font-size:12px}.highlights-preview-head a{color:#f2d79a;font-size:12px;text-decoration:none}.highlights-preview-head a:hover{text-decoration:underline}.highlights-preview img{display:block;width:100%;height:auto;border:1px solid #563733;background:#090909;box-shadow:0 12px 30px rgba(0,0,0,.35)}
@media(max-width:800px){.result-actions{flex-direction:column}.result-actions .download{text-align:center}.highlights-preview-head{align-items:flex-start;flex-direction:column}}
.director-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.85fr);gap:16px;margin:16px 0 26px}.director-field{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-size:13px}.director-field>span,.option-title{color:var(--text);font-weight:750}.director-field textarea{width:100%;resize:vertical;min-height:150px;background:#151313;color:var(--text);border:1px solid #65423e;border-radius:3px;padding:12px 13px;font:13px/1.45 Consolas,"Courier New",monospace}.director-field textarea:focus{outline:1px solid var(--red);border-color:var(--red)}.highlight-options{background:var(--panel2);border:1px solid #4d3734;padding:16px;display:flex;flex-direction:column;gap:8px}.highlight-options .check{padding:4px 0;color:var(--muted);font-size:13px}.highlight-options small{color:var(--muted);line-height:1.45;margin-top:5px}@media(max-width:800px){.director-grid{grid-template-columns:1fr}}

.director-save-row{display:flex;align-items:center;gap:12px;margin:-10px 0 26px}.save-status{color:var(--muted);font-size:12px;line-height:1.4}.save-status.save-ok{color:#c9d9b2}.save-status.save-error{color:#ff9b91}@media(max-width:800px){.director-save-row{align-items:stretch;flex-direction:column}.director-save-row .secondary{width:100%}}
.google-sheet-button{border:0;cursor:pointer;font:inherit}.google-sheet-button:disabled{opacity:.65;cursor:wait}.google-sheet-open{background:#2f6f49}.google-sheet-status{margin-top:9px;color:var(--muted);font-size:12px;line-height:1.45}.google-sheet-status.save-ok{color:#c9d9b2}.google-sheet-status.save-error{color:#ff9b91}

/* Shared footer + public legal pages */
.site-footer{position:fixed;bottom:0;left:0;right:0;background:#171717;height:44px;display:flex;align-items:center;font-size:12px;color:#ddd;z-index:20;border-top:1px solid #262020}
.footer-inner{width:min(1050px,calc(100% - 44px));margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:18px}
.footer-links{display:flex;align-items:center;gap:9px;white-space:nowrap}.footer-links a{color:#ddd;text-decoration:none}.footer-links a:hover,.footer-links a[aria-current="page"]{color:var(--cream);text-decoration:underline;text-underline-offset:3px}
.brand-link{color:var(--text);text-decoration:none}.brand-link:hover{color:var(--cream)}.crest{text-decoration:none}
.legal-shell{max-width:920px;margin-bottom:88px}.legal-panel{padding:34px 42px;line-height:1.65}.legal-panel h1{font-size:34px;margin:0 0 4px}.legal-updated{color:var(--muted);font-size:13px;margin:0 0 28px}.legal-panel h2{font-size:19px;margin:30px 0 8px;color:#fff;border-bottom:1px solid #3b2b29;padding-bottom:7px}.legal-panel p{color:#d9d0ce;margin:10px 0}.legal-panel a{color:var(--cream);text-decoration:none}.legal-panel a:hover{text-decoration:underline}.legal-panel code{background:#0d0c0c;border:1px solid #44302d;padding:2px 5px;border-radius:3px;color:#f3d7a1;overflow-wrap:anywhere}.legal-callout{margin:18px 0;background:#201b1a;border:1px solid #65423e;border-left:5px solid var(--red);padding:15px 18px}.legal-callout strong{color:#fff}.legal-callout p{margin:5px 0 0}
@media(max-width:800px){.footer-inner{width:calc(100% - 24px);gap:10px}.footer-links{gap:6px}.legal-panel{padding:24px 20px}.legal-panel h1{font-size:29px}.site-footer{height:auto;min-height:50px;padding:8px 0}.footer-inner{align-items:flex-start;flex-direction:column}.footer-links{white-space:normal;flex-wrap:wrap}.page-shell{margin-bottom:110px}body:before,body:after{inset:72px 0 66px}}
.site-footer{padding-left:0}

.drive-folder-row{display:flex;align-items:flex-end;gap:12px;margin:14px 0 8px}.drive-folder-field{display:flex;flex:1;flex-direction:column;gap:7px;color:var(--muted);font-size:12px}.drive-folder-field>span{color:var(--text);font-weight:750;font-size:13px}.drive-folder-field input{width:100%;box-sizing:border-box;background:#151313;color:var(--text);border:1px solid #65423e;border-radius:3px;padding:11px 12px;font:13px/1.35 Consolas,"Courier New",monospace}.drive-folder-field input:focus{outline:1px solid var(--red);border-color:var(--red)}.drive-folder-field input[readonly]{opacity:.7}.drive-folder-status{margin-bottom:24px}.google-drive-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}.google-drive-links a{color:#d8e6bf;text-decoration:none}.google-drive-links a:hover{text-decoration:underline}@media(max-width:800px){.drive-folder-row{align-items:stretch;flex-direction:column}.drive-folder-row .secondary{width:100%}}
