:root{--red:#ed1c24;--pink:#fde8e9;--ink:#111;--muted:#6b6b6b;--line:#e1e1dd;--paper:#f4f4f2;--green:#1f7a4d}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font:14px Arial,sans-serif}header{display:flex;justify-content:space-between;align-items:center;padding:20px 18px 14px;border-bottom:2px solid var(--red)}header img{width:90px;height:auto}h1{font-size:22px;margin:4px 0 0}.eyebrow{font-size:10px;font-weight:bold;color:var(--red);letter-spacing:1px}.version{font-size:10px;color:var(--muted);font-weight:normal;margin-left:8px}h2{font-size:18px;margin:0 0 10px}h3{font-size:12px;text-transform:uppercase;margin:24px 0 10px;color:var(--red)}p{line-height:1.45;margin:6px 0 14px}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:4px;background:white;color:var(--ink);padding:9px 12px}button:hover{border-color:#9a9a96;background:var(--paper)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--red);outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}.connection{display:flex;align-items:center;gap:7px;padding:9px 18px;font-size:12px;color:var(--muted);background:var(--paper)}.connection>span:first-child{width:6px;height:6px;border-radius:50%;background:#9a9a96}.connection>span.live{background:var(--green)}.connection .textbtn{margin-left:auto}nav{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:3}nav button{border:0;border-bottom:3px solid transparent;border-radius:0;padding:14px 3px;font-size:12px}nav button.active{border-bottom-color:var(--red);font-weight:bold}main{padding:18px;max-width:860px;margin:auto}.tab{display:none}.tab.active{display:block}.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.sectionhead h2{margin:0}.sectionhead button{font-size:12px}.types{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.types button{font-size:10px;padding:8px 2px}.types button span{display:block;font-size:22px;height:28px}.types button.active{border-color:var(--red);background:var(--pink);color:var(--red)}.previewbox{background:#fff;border:1px solid var(--line);border-radius:4px;margin:14px 0;padding:10px 8px 5px}#chartPreview{width:100%;display:block;overflow:visible}.previewnote{display:block;color:var(--muted);font-size:10px;text-align:center;margin:5px 0}details{border-top:1px solid var(--line);padding:14px 0}summary{font-weight:bold;cursor:pointer;margin-bottom:12px}label{display:block;font-size:12px;margin:10px 0;color:var(--muted)}input:not([type=checkbox],[type=color],[type=range]),select,textarea{width:100%;padding:8px;border:1px solid #c9c9c6;border-radius:3px;background:white;color:var(--ink);margin-top:5px;min-width:0}input[type=checkbox]{accent-color:var(--red)}input[type=color]{border:0;padding:0;background:transparent;width:30px;height:26px;cursor:pointer}input[type=range]{width:100%;accent-color:var(--red)}.fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.checks{display:flex;flex-wrap:wrap;gap:8px 16px}.checks label,.check{display:flex;align-items:center;gap:6px}.primary{background:var(--red);border-color:var(--red);color:white;font-weight:bold}.primary:hover{background:#cf1820;border-color:#cf1820}.secondary{font-size:12px;background:white}.textbtn{font-size:12px;border:0;background:none;padding:3px;color:var(--muted)}.row,.actions{display:flex;gap:8px;align-items:center;margin-top:10px}.actions{position:sticky;bottom:35px;background:white;padding:10px 0;z-index:2;border-top:1px solid var(--line)}.actions .primary{flex:1}.hint,.datahelp{font-size:12px;color:var(--muted);line-height:1.5}.datahelp{margin:8px 0}.data-grid{overflow-x:auto;max-height:340px;overflow-y:auto;border:1px solid var(--line);border-radius:4px}.data-grid table{border-collapse:collapse;width:100%;font-size:12px}.data-grid th{background:var(--paper);padding:4px;text-align:left;font-weight:normal}.data-grid td{border-top:1px solid var(--line);padding:3px}.data-grid input:not([type=color]){border:0;background:transparent;min-width:65px;width:100%;margin:0;padding:6px 3px;font-size:12px}.data-grid td:first-child input{min-width:92px}.data-grid button{border:0;padding:4px 5px;color:var(--muted);font-size:12px}.series-colors{display:flex;flex-wrap:wrap;gap:10px}.series-colors label{display:flex;align-items:center;gap:6px;color:var(--ink)}.sourcebox{padding:12px;background:var(--paper);margin-bottom:18px;border-radius:4px;font-size:12px}.sourcebox span{display:block;margin:5px 0}.sourcebox input{max-width:100%}.arrow-gallery{display:grid;grid-template-columns:1fr 1fr;gap:10px}.arrow-gallery button{display:flex;align-items:center;justify-content:center;gap:14px;background:var(--paper);font-size:14px}.arrow-gallery svg{height:140px;width:70px;fill:var(--red)}.asset-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.asset-grid button{font-size:28px;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--red);padding:7px}.asset-grid small{font-size:10px;color:var(--ink);margin-top:4px}.asset-grid button:has(.ring),.asset-grid button:has(.dot){font-size:10px;color:var(--ink);gap:9px}.ring{width:30px;height:30px;border:2px solid;border-radius:50%}.red{color:var(--red)}.green{color:var(--green)}.dot{width:16px;height:16px;border-radius:50%;background:currentColor}.brand-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.brand-grid button{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:95px;gap:10px;font-size:10px}.brand-grid img{max-width:100px;max-height:45px;object-fit:contain}.share-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.share-options b{display:block;font-size:18px;margin:5px 0}.share-options span{display:block;font-size:10px;color:var(--muted)}.audit-summary{padding:14px;background:var(--paper);margin:15px 0;font-weight:bold}.issue{border-bottom:1px solid var(--line);padding:12px 0;font-size:12px;line-height:1.5}.issue .rule{font-size:10px;text-transform:uppercase;color:var(--red);display:block;font-weight:bold}.issue .safe{color:var(--green);font-size:10px;margin-left:8px}#status{position:sticky;bottom:0;padding:11px 18px;background:var(--paper);border-top:1px solid var(--line);font-size:12px;min-height:38px;z-index:4}#status.error{background:var(--pink);color:#a81920}#status.busy{color:var(--muted)}footer{padding:9px 18px;color:var(--muted);font-size:10px}aside{padding:16px 18px;background:var(--pink);font-size:12px}aside p{margin:8px 0}#shareResult a{display:block;margin:12px 0;color:var(--red)}[hidden]{display:none!important}@media(min-width:850px){body{max-width:980px;margin:auto;border-left:1px solid var(--line);border-right:1px solid var(--line)}.types{grid-template-columns:repeat(8,1fr)}.previewbox{padding:14px 60px}main{padding:24px 32px}.data-grid{max-height:380px}.asset-grid{grid-template-columns:repeat(6,1fr)}}

/* Accessible interface text; slide artwork retains exact Tapal colours. */
.eyebrow,h3,.types button.active,.issue .rule{color:var(--ink)}
.primary{background:var(--ink);border-color:var(--ink);color:#fff}
.primary:hover{background:#3a3a3a;border-color:#3a3a3a}
#shareResult a{color:var(--ink);text-decoration:underline}

.asset-grid button[data-color="1F7A4D"]{color:var(--green)}

/* Studio additions */
nav{grid-template-columns:repeat(4,1fr)}nav button{padding:10px 2px} .template-gallery,.photo-gallery{display:grid;grid-template-columns:1fr 1fr;gap:10px}.template-card{padding:7px;text-align:left;font-size:12px}.template-card img{width:100%;display:block;margin-bottom:8px}.template-card.active{border:2px solid var(--red);background:var(--pink)}.template-card span{display:block;font-weight:bold}.template-card small{display:block;line-height:1.35;color:var(--muted);margin-top:5px}.full{width:100%;margin:10px 0}.harvey-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.harvey-grid button{padding:6px 1px;font-size:10px}.harvey-grid span{display:block;font:36px Arial;color:var(--red)}#templatePreview{width:100%;display:block}.photo-card{border:1px solid var(--line);padding:8px;font-size:12px}.photo-card img{width:100%;height:135px;object-fit:cover}.photo-card a,#pinterestLinks a{color:var(--ink);text-decoration:underline;display:block;margin:8px 0}.photo-card button{font-size:10px;padding:7px}.photo-card small{display:block;line-height:1.4;color:var(--muted)}#agendaGrid table{min-width:610px}#templateDataGrid table{min-width:600px}#agStatus.conflict{color:#a81920;background:var(--pink);padding:10px}.template-gallery{max-height:350px;overflow-y:auto}.asset-grid svg{width:38px;height:38px;display:block;margin:auto}#shareResult button{margin:8px 6px 0 0}

/* Compact command navigation and a separate template editor. */
header{padding:12px 14px 10px;border-bottom:0}header h1{font-size:18px;margin:0}header img{width:68px}.version{font-size:10px;background:var(--paper);padding:3px 5px;border-radius:3px}.connection{padding:5px 14px;background:white;font-size:10px}nav{display:flex;flex-wrap:nowrap;padding:4px 7px 0;gap:0;border-top:1px solid var(--line);align-items:stretch}nav button{display:flex;align-items:center;justify-content:center;gap:5px;flex:1 1 28px;min-width:28px;height:44px;padding:8px 4px;font-size:11px;white-space:nowrap}nav img{width:22px;height:22px;object-fit:contain;opacity:.7}nav button span{display:none}nav button.active{flex:1.8 0 auto;color:var(--red);background:#fff7f7}nav button.active img{opacity:1}nav button.active span{display:inline}main{padding:16px 14px}h2{font-size:18px;line-height:1.2}h3{margin-top:20px;font-size:11px;letter-spacing:.4px}label{font-size:11px}button{font-size:12px}.template-gallery{max-height:none;overflow:visible;gap:12px}.template-card{border-color:transparent;background:var(--paper);padding:8px}.template-card img{aspect-ratio:16/9;object-fit:cover;border:1px solid var(--line)}.template-card span{font-size:12px}.template-card small{font-size:10px}.back{margin-bottom:12px;padding:0;color:var(--muted)}#templateBuilder>.previewbox{margin:12px 0 20px;padding:5px}.segments{display:flex;margin-top:5px;border:1px solid #c9c9c6;border-radius:3px;overflow:hidden}.segments button{border:0;border-right:1px solid var(--line);border-radius:0;flex:1;padding:8px 0;background:#fff;font-size:11px;color:var(--ink)}.segments button:last-child{border-right:0}.segments button.active{background:var(--pink);color:var(--red);font-weight:bold}.segmented-source{display:none}#tplName{margin:2px 0 16px}.asset-grid{gap:7px}.asset-grid button{min-height:68px;border-color:transparent;background:var(--paper)}.asset-grid button:hover{border-color:var(--red)}.asset-grid small{font-size:10px}#splitDividerButton{display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px}#splitDividerButton svg{height:58px}#status{padding:8px 14px;font-size:11px}.photo-card{padding:7px}.photo-card img{height:108px}@media(min-width:850px){nav button{flex:1!important}nav button span{display:inline}main{padding:20px 24px}.template-gallery{grid-template-columns:repeat(3,1fr)}}

/* ---------- 0.5.0: compact editor at 340 px, labelled tabs, banners, confirm, findings ---------- */
nav{display:grid!important;grid-template-columns:repeat(4,1fr);gap:0;padding:2px 4px 0}
nav button{flex:none!important;height:auto;min-height:44px;flex-direction:column;gap:2px;padding:6px 2px;font-size:10px;white-space:normal;line-height:1.1}
nav button span{display:block!important}
nav button.active{background:#fff7f7;color:var(--red);font-weight:bold}
nav img{width:18px;height:18px;opacity:.8}
.banner{padding:9px 14px;font-size:11px;line-height:1.45;background:var(--pink);color:#7a1015;border-bottom:1px solid #f3c4c7}
.banner.info{background:var(--paper);color:var(--ink)}
.confirm{position:fixed;left:8px;right:8px;bottom:58px;z-index:6;background:#fff;border:2px solid var(--red);margin:0;padding:10px 12px;font-size:12px;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.confirm p{margin:0 0 8px}
.check.small{font-size:11px;margin:0 0 8px}
.editbanner{background:var(--paper);border-left:3px solid var(--red);padding:8px 10px;margin:4px 0 10px;font-size:11px;line-height:1.4}
.editbanner b,.editbanner span,.editbanner small{display:block;overflow:hidden;text-overflow:ellipsis}
.editbanner span{font-weight:bold;color:var(--ink);white-space:nowrap}
.editbanner small{color:var(--muted);white-space:nowrap}
.editbanner .note{margin:6px 0 0;color:#7a1015}
.subtabs{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);margin:4px 0 10px}
.subtabs button{border:0;border-bottom:3px solid transparent;border-radius:0;padding:8px 0;font-size:12px;background:none}
.subtabs button.active{border-bottom-color:var(--red);font-weight:bold}
.subtab{display:none}.subtab.active{display:block}
.data-grid.compact{max-height:300px}
.data-grid.compact table{table-layout:fixed;min-width:0}
.data-grid.compact th,.data-grid.compact td{padding:2px}
.data-grid.compact input:not([type=color]){min-width:0;padding:5px 3px}
.data-grid.compact td:first-child input{min-width:0}
.data-grid.compact th:last-child,.data-grid.compact td:last-child{width:30px;text-align:center}
.data-grid.compact input[type=color]{width:24px;height:22px}
.data-grid.compact td.ro{font-size:11px;padding:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.data-grid .x{padding:2px 4px}
.fields.three{grid-template-columns:1fr 1fr 1fr}
.order-list{border:1px solid var(--line);border-radius:4px;max-height:260px;overflow:auto}
.order-row{display:flex;align-items:center;gap:4px;padding:3px 6px;border-top:1px solid var(--line);font-size:12px}
.order-row:first-child{border-top:0}
.order-row span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-row button{border:0;padding:3px 7px;color:var(--muted)}
.actions{display:grid;grid-template-columns:1fr auto auto;gap:6px}
.actions button{white-space:nowrap;min-width:0}
.actions .primary{overflow:hidden;text-overflow:ellipsis}
.warnings{margin:8px 0;padding:8px 10px 8px 26px;background:#fff7e6;border-left:3px solid #c89d3c;font-size:11px;line-height:1.45}
#gapValue{float:right;color:var(--ink)}
button.issue{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:10px 4px;font-size:12px;line-height:1.45;background:#fff}
button.issue:hover{background:var(--paper)}
button.issue:disabled{opacity:1;cursor:default}
#check .row{flex-wrap:wrap}
.scope{border:1px solid var(--line);border-radius:4px;padding:6px 10px;margin:0 0 10px}
.scope legend{font-size:11px;color:var(--muted);padding:0 4px}
.scope .check{margin:6px 0}
input.inline{width:90px!important;display:inline-block;margin:0 0 0 6px!important;padding:4px 6px!important}
#shareResult p{font-size:12px;line-height:1.45;margin:8px 0;word-break:break-all}
.divider-styles{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:4px 0 8px}
.divider-styles button{padding:4px;font-size:10px;display:flex;flex-direction:column;gap:4px;background:var(--paper);border-color:transparent}
.divider-styles button.active{border:2px solid var(--red);background:var(--pink)}
.divider-styles img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
#dvStyle{display:none}
@media(min-width:850px){nav{grid-template-columns:repeat(7,1fr)}}

.v5-library details{border-top:1px solid var(--line);padding:6px 0}
.v5-library summary{font-size:12px;margin:4px 0}
.v5-library summary small{color:var(--muted);font-weight:normal}
.v5-library .asset-grid{grid-template-columns:repeat(4,1fr)}
.v5-library .asset-grid button{min-height:74px;padding:6px 2px}
.v5-library .asset-grid img{width:34px;height:34px;object-fit:contain}
.v5-library .asset-grid small{font-size:9px;line-height:1.15;text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#v5Search{margin:6px 0}
#formatSample.conflict{color:#a81920;background:var(--pink);padding:8px}

/* ---------- 0.5.1: no clipping at the default pane width (about 320-350 px) ---------- */
/* Radios were stretched by the generic input rule (width:100%), pushing Export scope labels to the right. */
input[type=radio]{width:auto;flex:none;margin:0;accent-color:var(--red)}
.scope .check{justify-content:flex-start;gap:8px;flex-wrap:wrap}
.scope .check.range input.inline{flex:1 1 90px;max-width:140px}
#rangeHint{margin:-2px 0 6px 24px;font-size:11px}
#rangeHint.conflict{color:#a81920}
/* Status line: wraps instead of cutting mid-word; at most three lines, full text in the tooltip. */
#status{white-space:normal;overflow-wrap:anywhere;line-height:1.4;max-height:calc(3 * 1.4em + 16px);overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.actions{bottom:var(--status-h,38px)}
.confirm{bottom:calc(var(--status-h,38px) + 10px)}
/* Primary button text wraps rather than clipping ("Jpdate char"). */
.actions .primary{overflow:visible;text-overflow:clip;white-space:normal;line-height:1.2;min-height:36px}
/* Office draws its info badge over the top-right corner of the pane. */
header{padding-right:34px}
main{padding-right:16px}
/* Agenda grid fits the pane: fixed columns, no horizontal cut. */
#agendaGrid table{min-width:0;table-layout:fixed;width:100%}
#agendaGrid col.w-presenter{width:28%}#agendaGrid col.w-min{width:50px}#agendaGrid col.w-page{width:44px}#agendaGrid col.w-break{width:34px}
#agendaGrid th,#agendaGrid td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#agendaGrid input:not([type=checkbox]){min-width:0;padding:6px 2px}
#agendaGrid td:first-child input{min-width:0}
#agendaGrid input[type=number]{text-align:right;-moz-appearance:textfield}
#agendaGrid td:last-child{text-align:center}
/* Template data: wide tables scroll sideways inside their own frame only; headers ellipsis with tooltip. */
#templateDataGrid{overflow-x:auto;max-width:100%}
#templateDataGrid table{min-width:max(100%,calc(var(--cols,6) * 88px))}
#templateDataGrid th{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:140px}
.data-grid th{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.data-grid.compact th input{min-width:0}
/* Long single words (file names, paths) never push the pane wider. */
main,#shareResult,.editbanner,.hint{overflow-wrap:anywhere}
body{max-width:100%;overflow-x:clip}
#agendaGrid input[type=checkbox]{min-width:0;width:auto;padding:0;margin:0}

/* 0.6.1: the last executive-block buttons stay clear of the sticky status bar */
.board-blocks{padding-bottom:72px}
/* 0.8.0 Save as Tapal: banner when the deck changed after the last check; whole-deck findings in the Check tab. */
.check-banner{display:flex;align-items:center;justify-content:space-between;gap:8px}
.check-banner[hidden]{display:none}
.check-banner .textbtn{font-weight:bold;white-space:nowrap}
.deck-check{border-top:1px solid #e1e1dd;margin-top:12px;padding-top:6px}
.deck-check[hidden]{display:none}
/* ---------- 0.8.1: template categories as a compact two-column list (readable at 320-400 px) ---------- */
.template-gallery>.gallery-nav{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0 6px;padding:0;position:static;border:0;background:none}
.gallery-nav .gallery-cat{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:36px;padding:6px 8px;border:1px solid var(--line);border-radius:3px;background:#fff;color:var(--ink);font-size:11px;line-height:1.25;text-align:left;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}
.gallery-nav .gallery-cat:hover,.gallery-nav .gallery-cat:focus-visible{border-color:var(--red);color:var(--red)}
.gallery-nav .gallery-cat-name{flex:1 1 auto;min-width:0}
.gallery-nav .gallery-cat-count{flex:0 0 auto;min-width:18px;padding:1px 5px;border-radius:9px;background:var(--paper);color:var(--muted);font-size:10px;text-align:center}
.template-gallery>.gallery-head{grid-column:1/-1;scroll-margin-top:112px}   /* lands below the sticky tab bar */
@media(min-width:600px){.template-gallery>.gallery-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
