
#tcc-right-ux{--bg:light-dark(#f4f7fb,#101923);--panel:light-dark(#fff,#1a2634);--ink:light-dark(#172e48,#e6edf5);--muted:light-dark(#62748a,#a9b9cb);--line:light-dark(#dce4ee,#354557);--blue:light-dark(#1565c0,#80b7ff);--soft:light-dark(#eaf3ff,#233e60);font:14px/1.5 Arial,sans-serif;color:var(--ink);background:var(--bg);border-radius:12px;overflow:hidden}#tcc-right-ux *{box-sizing:border-box}#tcc-right-ux header{display:flex;align-items:center;justify-content:space-between;padding:18px 25px;background:var(--panel);border-bottom:1px solid var(--line);gap:12px}#tcc-right-ux .brand{font-size:19px;font-weight:700;letter-spacing:-.6px}#tcc-right-ux .brand span{color:var(--blue)}#tcc-right-ux .tag{color:var(--muted);font-size:12px}#tcc-right-ux .affidavit-content{padding:24px}#tcc-right-ux h1{font-size:25px;margin:3px 0 4px;letter-spacing:-.6px}#tcc-right-ux h2{font-size:17px;margin:0}#tcc-right-ux h3{font-size:14px;margin:0 0 14px}#tcc-right-ux p{margin:0}#tcc-right-ux .muted{color:var(--muted)}#tcc-right-ux .layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;margin-top:22px;align-items:start}#tcc-right-ux .surface{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}#tcc-right-ux nav{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);background:var(--panel)}#tcc-right-ux button{font:inherit;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--ink);padding:9px 12px}#tcc-right-ux button:hover{background:var(--soft)}#tcc-right-ux nav button{border:0;border-radius:0;padding:16px 5px;font-size:12px;font-weight:600;border-bottom:3px solid transparent}#tcc-right-ux nav button[aria-pressed=true]{color:var(--blue);background:var(--soft);border-bottom-color:var(--blue)}#tcc-right-ux .formbody{padding:22px}#tcc-right-ux .intro{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:22px}#tcc-right-ux .badge{font-size:11px;padding:4px 8px;border-radius:20px;background:var(--soft);color:var(--blue);white-space:nowrap}#tcc-right-ux .fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}#tcc-right-ux label.field{display:block;font-size:12px;font-weight:600}#tcc-right-ux input:not([type=checkbox]),#tcc-right-ux select,#tcc-right-ux textarea{display:block;width:100%;font:14px Arial,sans-serif;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:10px;margin-top:6px;min-width:0}#tcc-right-ux input[type=checkbox]{accent-color:var(--blue);width:16px;height:16px;flex-shrink:0}#tcc-right-ux .full{grid-column:1/-1}#tcc-right-ux hr{border:0;border-top:1px solid var(--line);margin:24px 0}#tcc-right-ux .foot{display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-top:1px solid var(--line);gap:12px}#tcc-right-ux .primary{background:var(--blue);color:light-dark(#fff,#102033);border-color:var(--blue);font-weight:600}#tcc-right-ux .primary:hover{opacity:.9;background:var(--blue)}#tcc-right-ux .sidehead{padding:18px;border-bottom:1px solid var(--line)}#tcc-right-ux .selection{padding:10px 18px}#tcc-right-ux .docrow{display:flex;align-items:center;justify-content:space-between;padding:10px 0;gap:6px}#tcc-right-ux .docrow label{display:flex;align-items:center;gap:8px;font-size:13px}#tcc-right-ux .link{border:0;padding:5px;color:var(--blue);font-size:12px;background:transparent}#tcc-right-ux .previewwrap{padding:16px 18px;background:var(--bg);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}#tcc-right-ux .paper{background:var(--panel);border:1px solid var(--line);padding:23px 20px;box-shadow:0 3px 8px light-dark(#172e4809,#00000025);font:12px/1.8 Georgia,serif;overflow-wrap:anywhere}#tcc-right-ux .paper h3{text-align:center;font:700 14px Georgia,serif;margin-bottom:7px}#tcc-right-ux .paper .sub{text-align:center;font-size:10px;letter-spacing:1px;margin-bottom:18px}#tcc-right-ux .paper p{margin-bottom:14px}#tcc-right-ux .paper .sign{text-align:right;margin-top:25px}#tcc-right-ux .previewlabel{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:12px}#tcc-right-ux .download{padding:18px}#tcc-right-ux .wide{width:100%}#tcc-right-ux .download label{font-size:12px}#tcc-right-ux .download select{margin-bottom:12px}#tcc-right-ux .small{font-size:12px}#tcc-right-ux .message{font-size:12px;color:var(--blue);margin-top:10px}#tcc-right-ux .shared{padding:12px;background:var(--soft);border-radius:6px;margin-bottom:20px;font-size:12px}#tcc-right-ux [hidden]{display:none!important}#tcc-right-ux .expanded{margin-top:20px}#tcc-right-ux .expanded .paper{max-width:650px;margin:18px auto;font-size:16px;padding:35px}#tcc-right-ux button:disabled{opacity:.5} @media(max-width:620px){#tcc-right-ux .layout{grid-template-columns:1fr}#tcc-right-ux .affidavit-content{padding:16px}#tcc-right-ux header{padding:16px}}@media(max-width:420px){#tcc-right-ux .fields{grid-template-columns:1fr}#tcc-right-ux nav{grid-template-columns:1fr 1fr}#tcc-right-ux .formbody{padding:16px}#tcc-right-ux .tag{display:none}#tcc-right-ux .foot{flex-wrap:wrap}#tcc-right-ux input:not([type=checkbox]),#tcc-right-ux select{font-size:16px}}
@media(min-width:621px) and (max-width:820px){#tcc-right-ux .affidavit-content{padding:14px}#tcc-right-ux .layout{gap:12px}#tcc-right-ux .formbody{padding:16px}#tcc-right-ux nav{grid-template-columns:1fr 1fr}#tcc-right-ux .fields{grid-template-columns:1fr}#tcc-right-ux .intro{flex-wrap:wrap}#tcc-right-ux .foot{flex-wrap:wrap}}

/* Advertisement layout: left ad | data form | preview and download. */
#tcc-right-ux .layout{grid-template-columns:160px minmax(0,1fr) 280px;gap:16px}
#tcc-right-ux .layout > *{min-width:0}
#tcc-right-ux .tcc-ad{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:10px;text-align:center;color:var(--muted)}
#tcc-right-ux .tcc-ad-label{display:block;font-size:10px;letter-spacing:1.5px;margin-bottom:8px}
#tcc-right-ux .tcc-ad-content{display:flex;justify-content:center;align-items:center;min-height:90px;font-size:12px;max-width:100%;overflow-wrap:anywhere}
#tcc-right-ux .tcc-ad-content img{max-width:100%;height:auto}
#tcc-right-ux .tcc-ad-content iframe{max-width:100%;border:0}
#tcc-right-ux .tcc-ad-left .tcc-ad-content{min-height:560px}
#tcc-right-ux .tcc-ad-top{margin-bottom:22px}
#tcc-right-ux .tcc-ad-bottom{margin-top:22px}
@media(min-width:981px) and (max-width:1150px){
 #tcc-right-ux .layout{grid-template-columns:140px minmax(0,1fr) 270px;gap:12px}
 #tcc-right-ux nav{grid-template-columns:1fr 1fr}
 #tcc-right-ux .intro,#tcc-right-ux .foot{flex-wrap:wrap}
}
@media(max-width:980px){
 #tcc-right-ux .layout{grid-template-columns:minmax(0,1fr) 280px}
 #tcc-right-ux .tcc-ad-left{grid-column:1/-1}
 #tcc-right-ux .tcc-ad-left .tcc-ad-content{min-height:90px}
}
@media(max-width:620px){
 #tcc-right-ux .layout{grid-template-columns:minmax(0,1fr)}
}
@media print{#tcc-right-ux .tcc-ad{display:none!important}}

/* Integration with the existing layouts/main.php. Scoped to this page only. */
body.tcc-affidavits-ux .tcc-page-layout{display:grid;grid-template-columns:160px minmax(0,1fr);gap:20px;align-items:start}
body.tcc-affidavits-ux .tcc-page-content{min-width:0;width:100%;max-width:none}
body.tcc-affidavits-ux .tcc-left-panel{width:100%;max-width:none;min-width:0}
#tcc-right-ux{width:100%;border-radius:0;overflow:visible}
#tcc-right-ux .layout{grid-template-columns:minmax(0,1fr) 280px}
#tcc-right-ux .affidavit-content{padding:16px 0}
#tcc-right-ux nav{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1100px){
 body.tcc-affidavits-ux .tcc-page-layout{grid-template-columns:minmax(0,1fr)}
 body.tcc-affidavits-ux .tcc-left-panel{max-width:240px;justify-self:center}
}
@media(max-width:820px){#tcc-right-ux nav{grid-template-columns:1fr 1fr}}
@media(max-width:620px){#tcc-right-ux .layout{grid-template-columns:minmax(0,1fr)}}
@media print{body.tcc-affidavits-ux .tcc-left-panel{display:none!important}}


/* Left advertisement | affidavit workspace | right advertisement */
body.tcc-affidavits-ux .tcc-page-layout {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 20px;
    align-items: start;
}

body.tcc-affidavits-ux .tcc-page-content,
body.tcc-affidavits-ux .tcc-side-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
}

body.tcc-affidavits-ux .tcc-page-content {
    container-type: inline-size;
    container-name: affidavit-workspace;
}

/* Form uses remaining width; preview stays on its right */
#tcc-right-ux .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
}

#tcc-right-ux .layout > * {
    min-width: 0;
}

/* Adapt to the actual available workspace width */
@container affidavit-workspace (max-width: 900px) {
    #tcc-right-ux nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tcc-right-ux .intro,
    #tcc-right-ux .foot {
        flex-wrap: wrap;
    }
}

@container affidavit-workspace (max-width: 720px) {
    #tcc-right-ux .layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Smaller screens: advertisements above and below workspace */
@media (max-width: 1100px) {
    body.tcc-affidavits-ux .tcc-page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.tcc-affidavits-ux .tcc-side-panel {
        max-width: 240px;
        justify-self: center;
    }
}

@media print {
    body.tcc-affidavits-ux .tcc-side-panel {
        display: none !important;
    }
}
/* Connected document forms */
#tcc-right-ux .aff-field-section{margin:0 0 24px}
#tcc-right-ux #tcc-errors{padding:16px;margin:16px 0;background:#fff1ed;color:#822a15;border:1px solid #e6ac9d;border-radius:8px}
#tcc-right-ux #tcc-errors button{background:transparent;color:inherit;text-align:left;border:0;text-decoration:underline;padding:4px 0}
#tcc-right-ux #tcc-errors ul{margin-bottom:0}
#tcc-right-ux #tcc-preview-frame{width:100%;height:440px;border:1px solid var(--line);background:white;margin:12px 0}
#tcc-right-ux #tcc-large-frame{width:100%;height:850px;border:0;background:white}
#tcc-right-ux #tcc-single,#tcc-right-ux #tcc-refresh{margin-top:10px}
#tcc-right-ux nav{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
#tcc-right-ux .fields>*{min-width:0}
#tcc-right-ux .badge{white-space:normal}
#tcc-right-ux .intro,#tcc-right-ux .foot{flex-wrap:wrap}
#tcc-right-ux .selection label{overflow-wrap:anywhere}

/* Affidavit improvements v4: scoped to this page. */
#tcc-right-ux .layout{grid-template-columns:minmax(0,1fr) minmax(280px,340px);align-items:start}
#tcc-right-ux .section-capsule,
#tcc-right-ux details.technical summary{display:table;margin:0 0 18px;padding:9px 16px;border-radius:24px;background:#eaf2ff;border:1px solid #ccdefa;color:#164986;font-size:14px;font-weight:700;line-height:1.5}
#tcc-right-ux details.technical{padding:16px;border:1px solid #d6e2f1;border-radius:12px;background:#fafcff}
#tcc-right-ux details.technical summary{display:list-item;cursor:pointer;margin:0;width:fit-content}
#tcc-right-ux details.technical summary span{font-size:11px;font-weight:400;margin-left:12px}
#tcc-right-ux details.technical[open] summary{margin-bottom:20px}
#tcc-right-ux #tcc-preview-frame{display:block;width:100%!important;max-width:100%;height:560px!important;min-height:560px;border-radius:6px}
#tcc-right-ux [hidden]{display:none!important}
#tcc-right-ux #tcc-expanded{position:fixed;inset:0;margin:auto;width:min(1120px,96vw);max-width:96vw;height:min(900px,92dvh);max-height:92dvh;padding:0;border:1px solid #ccd9e9;border-radius:16px;background:#f1f5fa;color:#163459;box-shadow:0 24px 80px #10244455;overflow:hidden}
#tcc-right-ux #tcc-expanded[open]{display:flex;flex-direction:column}
#tcc-right-ux #tcc-expanded::backdrop{background:#0e213c99;backdrop-filter:blur(3px)}
#tcc-right-ux .modalhead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;background:white}
#tcc-right-ux #tcc-large-frame{display:block;width:100%!important;max-width:100%;height:auto!important;flex:1;min-height:0;border:0;background:#edf2f8}
#tcc-right-ux #tcc-login-notice{margin-top:18px;line-height:1.7}
#tcc-right-ux #tcc-login-link{display:inline-block;margin:8px;text-decoration:none;padding:8px 14px;border-radius:6px}
@container affidavit-workspace (max-width:900px){#tcc-right-ux .layout{grid-template-columns:minmax(0,1fr) 280px}#tcc-right-ux .fields{grid-template-columns:minmax(0,1fr)}}
@container affidavit-workspace (max-width:720px){#tcc-right-ux .layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){#tcc-right-ux #tcc-preview-frame{height:460px!important;min-height:460px}#tcc-right-ux .modalhead{padding:12px}#tcc-right-ux .modalhead h2{font-size:16px}}
