/* Version 1.1.1: comfortable page layout over the existing workbook workflow. */
.app-container{max-width:1580px;margin:0 auto;padding:0 32px}
.header-inner{max-width:1580px;margin:auto;padding:22px 32px}
.site-header .brand{font-size:24px}.site-header .brand img{width:42px;height:42px}
.site-header nav{gap:24px;font-size:14px}.local-badge{font-size:13px;color:var(--green)}
.site-header .text-button{font-size:14px}.version{font-size:12px;padding:5px 12px}
.intro{padding:44px 0 24px}.intro h1{font-size:38px;max-width:900px}.intro p.muted{font-size:16px;margin-top:16px}.eyebrow{font-size:11px}
.upload-panel{padding:28px;margin:16px 0 40px}.dropzone{display:flex;justify-content:space-between;align-items:center;gap:28px;text-align:left;padding:30px;background:#f9fcfa}.dropzone strong{font-size:20px}.dropzone p{font-size:15px;margin:8px 0 0}.upload-footer{font-size:13px;gap:20px;flex-wrap:wrap;padding-top:20px}.delimiter-label{font-size:13px}.delimiter-label select{font-size:14px;padding:8px 12px}.file-ready{margin-top:22px;padding:18px}.file-ready strong{font-size:16px}.file-ready .small{font-size:13px}
.button{font-size:14px;min-height:44px;padding:11px 18px;border-radius:8px}.text-button{font-size:13px;padding:8px}.small,.tiny{font-size:13px;line-height:1.65}
.status-row{display:flex;align-items:center;gap:12px;min-height:38px;font-size:13px;padding:8px 0;color:var(--green)}.status-row.loading #status:before{content:'';display:inline-block;width:12px;height:12px;border:2px solid #c1ded0;border-top-color:var(--green);border-radius:50%;margin-right:8px;animation:spin 1s linear infinite}.status-row:has(#status:empty){min-height:20px;padding:0}
#error{font-size:14px;margin:12px 0}.alert{font-size:14px}
.book-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0 24px}.book-toolbar>div:first-child{display:flex;align-items:flex-start;flex-direction:column;gap:10px;min-width:0}.book-toolbar strong{font-size:20px;font-weight:650;overflow-wrap:anywhere}.book-toolbar .pill{font-size:13px;background:#edf7f1;border:0;padding:6px 12px}.book-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.book-actions .button{font-size:14px}.book-actions .text-button{font-size:13px}
.sheet-tabs{display:flex;gap:12px;overflow:auto;padding:0 0 22px;border-bottom:1px solid var(--line)}.sheet-tab{min-width:200px;min-height:77px;padding:15px 20px;background:#fff;border:1px solid #cedbd6;border-radius:10px;font-size:16px;color:var(--ink);text-align:left;white-space:nowrap}.sheet-tab[aria-current]{background:#eaf6ef;border:2px solid var(--green);padding:14px 19px;box-shadow:0 2px 8px #126c5c10}.sheet-tab .sheet-status{display:block;font-size:13px;font-weight:500;margin-top:7px;color:#93641d}.sheet-tab.approved .sheet-status{color:#126c5c}.sheet-tab[aria-current]::after{content:'Current worksheet';display:inline-block;font-size:11px;letter-spacing:.02em;margin-top:8px;color:var(--green)}
.worksheet-bar{padding:28px 0}.worksheet-bar .eyebrow{margin-bottom:7px}.worksheet-bar h2{font-size:27px;overflow-wrap:anywhere}.metrics-caption{font-size:13px;color:var(--muted);margin:20px 0 12px}.compact-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.compact-metrics .metric{background:none;border:0;border-radius:0;box-shadow:none;padding:17px 20px;border-right:1px solid #e6ece9}.compact-metrics .metric:last-child{border-right:0}.compact-metrics .metric strong{display:block;font-size:26px;font-weight:650;line-height:1.2;letter-spacing:-.02em}.compact-metrics .metric span{display:block;font-size:13px;color:var(--muted);margin-top:7px}
.editor-grid{display:grid;grid-template-columns:minmax(350px,390px) minmax(0,1fr);gap:28px;align-items:start;margin-bottom:40px;height:auto;min-height:0;max-height:none}.editor-grid .panel{padding:26px;border-radius:14px;min-width:0;box-shadow:0 4px 20px #163b4208}
.controls-panel{display:block;overflow:visible}.controls-scroll{overflow:visible;max-height:none;padding:0}.controls-panel .section-heading{margin-bottom:10px;gap:12px}.controls-panel h2{font-size:22px}.controls-panel .section-heading .text-button{font-size:12px;padding:4px}.controls-panel>.tiny,.controls-scroll>.tiny{margin:0 0 18px;font-size:13px}
.option{padding:19px 0;gap:12px}.option strong{font-size:15px;font-weight:650;line-height:1.5}.option small{font-size:13px;line-height:1.6;margin-top:5px}.option input{width:19px;height:19px;margin-top:3px}.option em{font-size:11px;font-weight:500;display:inline-block;padding:2px 6px;margin-top:3px;margin-left:0}.controls-panel details{padding-top:23px;margin-top:23px}.controls-panel summary{font-size:17px;font-weight:650;line-height:1.5}.controls-panel details p{font-size:13px;line-height:1.65}.controls-panel details .tiny{font-size:13px}.controls-panel .missing-section summary .tiny{font-size:12px;font-weight:400;display:block;margin:4px 0 0 18px}
#heading-editors{margin-top:18px}#heading-editors>.tiny{font-size:13px;font-weight:600;color:var(--ink)}#heading-column{display:block;width:100%;font-size:15px;padding:11px 12px;margin-top:8px;border-radius:8px;min-height:45px}.heading-editor{display:grid;grid-template-columns:minmax(0,1fr) 58px;gap:8px;margin-top:18px;align-items:start}.heading-editor label{grid-column:1/-1;white-space:normal;overflow-wrap:anywhere;color:var(--muted);font-size:13px;line-height:1.5}.heading-editor input{font-size:15px;padding:10px 12px;width:100%;min-height:44px;border-radius:8px}.heading-editor input.manual{border-color:#65a38b;background:#f4fbf6}.heading-editor input[aria-invalid=true]{border-color:#bd674e;background:#fff4ef}.header-clear{font-size:12px;background:white;color:var(--green);border:1px solid #c8dcd2;border-radius:8px;min-height:44px;padding:8px 5px;cursor:pointer}.heading-error{grid-column:1/-1;margin:0;color:#a03925;font-size:13px;line-height:1.6}.heading-error:empty{display:none}#heading-issue-count{font-size:12px;font-weight:500;color:#a3422a;display:block;margin-left:18px}
.column-option{padding:13px 0;gap:10px;font-size:14px;line-height:1.6}.column-option input{width:18px;height:18px;margin-top:4px}.column-option .muted{font-size:12px;display:block;margin-top:5px}.column-option span{overflow-wrap:anywhere}.placeholder{font-size:13px;font-weight:600;margin-top:18px;gap:8px}.placeholder input{font-size:15px;padding:10px 12px;font-weight:400;min-height:44px}#column-options{max-height:360px;overflow:auto}
.approval-box{margin-top:28px;padding:23px 19px;background:#f4f8fa;border:1px solid #d7e3e8;border-radius:10px}.approval-box h3{font-size:17px;line-height:1.5;margin:0 0 12px;letter-spacing:-.015em}.approval-state{margin:0;color:#28596f;font-size:15px;font-weight:650}.approval-box.is-approved{background:#edf8f0;border-color:#bcdcc8}.approval-box.is-approved .approval-state{color:var(--green)}.approval-box #approval-block{font-size:13px;color:#a03925;margin-top:9px}.approval-box #approval-block:empty{display:none}.approval-box .export-consent{font-size:13px;line-height:1.65;margin:17px 0;gap:10px}.approval-box .export-consent input{width:19px;height:19px;flex-shrink:0}.approval-box .button{width:100%;font-size:14px;min-height:46px}.approval-box>.tiny{font-size:12px;margin-top:14px;line-height:1.65}
.live-panel{display:block;overflow:visible;min-width:0}.live-panel .section-heading{margin-bottom:21px;gap:15px;align-items:flex-start}.live-panel h2{font-size:25px}.live-panel .eyebrow{font-size:11px;margin-bottom:7px}.legend{font-size:12px;color:var(--muted);line-height:1.8;white-space:nowrap}.legend-swatch,.removed-swatch{display:inline-block;vertical-align:middle;width:12px;height:12px;border-radius:3px}.legend-swatch{background:#d9efdc;border:1px solid #83ba94}.removed-swatch{background:#ffebe6;border:1px solid #d69b88;margin-left:10px}
.change-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.change-chip{display:flex;flex-direction:column;gap:5px;background:#f4f8f5;border:1px solid #e1ece5;padding:16px 18px;border-radius:9px;color:#536c60;font-size:13px;line-height:1.5}.change-chip strong{font-size:25px;font-weight:650;color:var(--green);line-height:1.2}.summary-details{border:0;padding:0;margin:13px 0 0}.summary-details summary{font-size:12px;font-weight:500;color:var(--muted)}.summary-details p{font-size:13px;color:var(--muted)}
.preview-tools{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;margin:25px 0 15px;font-size:13px}.preview-tools>label{display:flex;align-items:center;gap:9px;cursor:pointer}.preview-tools input{width:18px;height:18px}.preview-tools>div{display:flex;align-items:center;gap:10px}.preview-tools .button{min-height:36px;padding:6px 12px;font-size:16px}.change-detail{font-size:14px;line-height:1.65;padding:16px 18px;background:#eef7f0;border:1px solid #d7e9dc;border-left:3px solid #3b9465;border-radius:7px;color:#2d644b;margin:0 0 23px;overflow-wrap:anywhere;white-space:normal}
.comparison-grid{display:flex;flex-direction:column;gap:28px;min-width:0}.comparison-side{display:block;min-width:0}.comparison-side h3{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:18px;margin-bottom:12px;line-height:1.5}.comparison-side h3 span{font-size:14px;font-weight:500;color:var(--muted);white-space:nowrap}.comparison-side .table-scroll{width:100%;min-height:150px;max-height:330px;border-radius:9px;border-color:#cddbd4;overflow:auto;scrollbar-gutter:stable}.table-scroll table{font-size:14px;min-width:100%;border-collapse:separate;border-spacing:0}th,td{font-family:Segoe UI,Arial,sans-serif;height:44px;padding:11px 14px;max-width:340px;line-height:1.5}th{font-size:13px;font-weight:650;position:sticky;top:0;z-index:2;background:#edf4ef;color:#315845}td{font-size:14px}.row-number{font-size:11px;min-width:72px;color:#728478;background:#fafcfb}.changed{background:#dbf0df!important;color:#17582c}.heading-changed{background:#cde8d3!important}.cell-focused{box-shadow:inset 0 0 0 2px #29824a}.blank{color:#7b8b82;font-size:13px}tr.removed td{background:#ffede8!important;color:#9b4933}tr.removed td.cell-value{text-decoration:line-through}.removed-label{font-size:12px;font-weight:600;text-decoration:none!important}#cleaned-table th{background:#e7f3eb}.pagination{font-size:13px;margin-top:22px;gap:12px;flex-wrap:wrap}.pagination .button{font-size:12px;min-height:37px;padding:7px 13px}.preview-note{font-size:12px;line-height:1.65;margin-top:16px}
.help-panel{margin:12px 0 32px;padding:30px;border-radius:14px;background:#fff;position:static}.help-panel h2{font-size:25px}.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:36px;margin-top:12px}.help-grid h3{font-size:17px;margin-top:18px}.help-grid p,.help-panel details p{font-size:14px;color:var(--muted);line-height:1.8}.help-panel summary{font-size:14px}
footer{padding:24px 0;font-size:12px}.footer-inner{gap:14px}body.working .intro,body.working #upload-panel{display:none}body.working{height:auto;overflow:visible;display:block}body.working #main{display:block;width:100%;height:auto;min-height:0}#workspace[aria-busy=true] .table-scroll{opacity:.78}
@media(min-width:1500px){.editor-grid{grid-template-columns:410px minmax(0,1fr)}.change-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.change-chip{padding:16px 13px}}
@media(max-width:1100px){.app-container{padding:0 24px}.header-inner{padding:20px 24px}.editor-grid{grid-template-columns:330px minmax(0,1fr);gap:22px}.editor-grid .panel{padding:22px}.book-toolbar{align-items:flex-start}.book-actions{justify-content:flex-end;gap:8px}.book-actions .button{font-size:13px}.compact-metrics .metric{padding:16px 13px}.compact-metrics .metric span{font-size:12px}.legend{white-space:normal}.live-panel .section-heading{flex-direction:column;gap:8px}.sheet-tab{min-width:180px}.comparison-side h3{font-size:17px}}
@media(max-width:900px){.editor-grid{grid-template-columns:1fr;gap:25px}.live-panel{order:0}.controls-panel{order:0}.controls-panel .controls-scroll{overflow:visible}.compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-metrics .metric:nth-child(-n+3){border-bottom:1px solid #e6ece9}.compact-metrics .metric:nth-child(3){border-right:0}.compact-metrics .metric:last-child{border-right:0}.book-toolbar{flex-direction:column;gap:20px}.book-toolbar>div:first-child{gap:10px}.book-actions{justify-content:flex-start}.sheet-tab{font-size:15px}.header-inner{gap:20px}.local-badge{display:none}.controls-panel .option strong{font-size:15px}.controls-panel{max-height:none}.live-panel .section-heading{flex-direction:row}.help-grid{grid-template-columns:1fr;gap:10px}}
@media(max-width:600px){.app-container{padding:0 16px}.header-inner{padding:18px 16px}.site-header .brand{font-size:20px}.site-header .brand img{width:34px;height:34px}.site-header nav{gap:12px}.site-header .text-button{font-size:12px}.version{display:none}.intro{padding-top:28px}.intro h1{font-size:31px}.intro p.muted{font-size:15px}.upload-panel{padding:20px}.dropzone{flex-direction:column;align-items:flex-start;gap:20px;padding:23px}.dropzone strong{font-size:18px}.dropzone p{font-size:14px}.upload-footer{align-items:flex-start;flex-direction:column;font-size:12px;gap:13px}.file-ready{flex-direction:column;align-items:stretch}.book-toolbar{padding-top:14px}.book-toolbar strong{font-size:18px}.book-actions{gap:8px}.book-actions .text-button{font-size:12px}.book-actions .button{width:100%;font-size:14px;justify-content:center}.sheet-tabs{gap:10px}.sheet-tab{min-width:170px;padding:13px 15px;min-height:80px}.sheet-tab[aria-current]{padding:12px 14px}.sheet-tab .sheet-status{font-size:12px}.worksheet-bar{padding:24px 0}.worksheet-bar h2{font-size:24px}.compact-metrics .metric{padding:15px 12px}.compact-metrics .metric strong{font-size:23px}.compact-metrics .metric span{font-size:11px;line-height:1.6}.editor-grid .panel{padding:22px 18px}.controls-panel h2{font-size:21px}.controls-panel .section-heading{align-items:flex-start}.controls-panel .section-heading .text-button{font-size:11px;white-space:nowrap}.option strong{font-size:15px}.option small{font-size:13px}.change-summary{gap:10px}.change-chip{font-size:12px;padding:14px 12px}.change-chip strong{font-size:24px}.live-panel .section-heading{flex-direction:column}.preview-tools{font-size:12px;gap:15px}.preview-tools .button{min-height:36px}.comparison-side h3{font-size:17px;gap:8px}.comparison-side h3 span{font-size:12px}.comparison-side .table-scroll{max-height:340px;min-height:150px}.change-detail{font-size:13px;padding:13px 14px}.pagination{font-size:12px}.help-panel{padding:22px}.help-panel h2{font-size:23px}.footer-inner{flex-direction:column;gap:7px}}
.book-hint{margin:0 0 20px;font-size:14px;color:var(--muted)}
.preview-summary-section{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.preview-summary-section>h3{font-size:17px;margin-bottom:15px}.preview-summary-section .change-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.preview-summary-section .change-chip{padding:14px 12px;font-size:12px}.preview-summary-section .change-chip strong{font-size:23px}@media(max-width:1100px){.preview-summary-section .change-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
