/* Caption workshop, new layout (trial copy). Applies to the app's own page once clay-cap.js has marked it .cw-on (desktop, light theme). */
@media (min-width:1000px){
[data-theme="light"] .n4d-cw.cw-on .n4d-cgrid{grid-template-columns:270px minmax(0,1fr) 330px !important;gap:16px;align-items:start}
@media (max-width:1250px){[data-theme="light"] .n4d-cw.cw-on .n4d-cgrid{grid-template-columns:240px minmax(0,1fr) !important} [data-theme="light"] .n4d-cw.cw-on .n4d-cside{grid-column:1/-1}}

/* the list: a ring per post, title on its own clear line, the four letters go */
[data-theme="light"] .n4d-cw.cw-on .n4d-ci{display:grid !important;grid-template-columns:44px minmax(0,1fr);column-gap:10px;row-gap:2px;align-items:center;min-height:62px;padding:8px 10px !important;border-radius:16px !important;text-align:start}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci::before{content:attr(data-cw-n);grid-row:1 / span 2;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:900;color:#20184a;font-variant-numeric:tabular-nums;background:radial-gradient(circle closest-side,#fff 72%,transparent 73%),conic-gradient(#1c7a4a calc(var(--cw-p,0)*1%),#e2daf7 0)}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci > b{grid-column:2;font-size:14.5px;font-weight:900;line-height:1.3;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci > .n4d-cim{grid-column:2;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci .n4d-dots{display:none !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci > b::after{display:none}

/* the editor: the text box is the centre of the page */
[data-theme="light"] .n4d-cw.cw-on .n4d-ced{display:grid !important;grid-template-columns:minmax(0,1fr);gap:12px;padding:20px 22px !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref){grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced > *{grid-column:1 / -1;min-width:0;margin:0 !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced > .n4d-ref{grid-column:1;align-self:stretch;background:#f7f3ff;border-radius:18px;padding:12px 14px;border:0}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced > .n4d-ref p{font-size:16px;line-height:1.8;margin:6px 0 0;white-space:pre-wrap;unicode-bidi:plaintext}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref) > .n4d-cap{grid-column:2}
[data-theme="light"] .n4d-cw.cw-on .n4d-cap{min-height:230px !important;font-size:17px !important;font-weight:700;line-height:1.7 !important;border-radius:18px !important;padding:14px 16px !important;border:2px solid #e2daf7 !important;background:#faf8ff !important;resize:vertical;unicode-bidi:plaintext}
[data-theme="light"] .n4d-cw.cw-on .n4d-cap:focus{border-color:#6a46e8 !important;background:#fff !important;box-shadow:0 0 0 5px rgba(106,70,232,.12)}
[data-theme="light"] .n4d-cw.cw-on .n4d-bh h2{font-size:22px !important;font-weight:900;line-height:1.2}

/* language tabs: four equal tabs, the state in words on its own line */
[data-theme="light"] .n4d-cw.cw-on .n4d-lts{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;background:none !important;padding:0 !important;border:0 !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt{display:grid !important;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:8px;row-gap:0;justify-items:start;min-height:56px;padding:8px 12px !important;border-radius:16px !important;background:#f7f3ff !important;color:#20184a !important;text-align:start;border:0 !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt > b{font-size:15.5px;font-weight:900;grid-column:2}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt > .n4d-dot{grid-row:1 / span 2;grid-column:1}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt > small{grid-column:2;font-size:12.5px;font-weight:800;color:#574f80}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt > small.n4d-ltm{display:none}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt[aria-selected="true"]{background:#20184a !important;color:#fff !important;box-shadow:0 10px 20px -12px rgba(32,24,74,.8)}
[data-theme="light"] .n4d-cw.cw-on .n4d-lt[aria-selected="true"] > small,
[data-theme="light"] .n4d-cw.cw-on .n4d-lt[aria-selected="true"] > b,
[data-theme="light"] .n4d-cw.cw-on .n4d-lt[aria-selected="true"] .sc-interp{color:#fff !important}

/* one bar for the actions */
[data-theme="light"] .n4d-cw.cw-on #cw-dock{display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:#20184a;color:#fff;border-radius:20px;padding:10px 12px;font-family:"Nunito",system-ui,sans-serif}
[data-theme="light"] .n4d-cw.cw-on .cw-save{font-size:13.5px;font-weight:800;color:#cfc6f3;padding-inline:6px}
[data-theme="light"] .n4d-cw.cw-on .cw-btn{border:0;border-radius:999px;background:#6a46e8;color:#fff;font:inherit;font-size:14px;font-weight:900;padding:9px 16px;min-height:40px;cursor:pointer}
[data-theme="light"] .n4d-cw.cw-on .cw-pill{border:0;border-radius:999px;background:#e0f4e3;color:#17603c;font:inherit;font-size:13.5px;font-weight:900;padding:9px 14px;min-height:40px;cursor:pointer}
[data-theme="light"] .n4d-cw.cw-on .cw-pill.no{background:#fde3dc;color:#9c3413}
[data-theme="light"] .n4d-cw.cw-on .cw-n{margin-inline-start:auto;font-size:13.5px;font-weight:900;padding-inline:6px;font-variant-numeric:tabular-nums}
[data-theme="light"] .n4d-cw.cw-on #cw-dock :focus-visible{outline:3px solid #ffb27a;outline-offset:2px}
/* the app's Copy row joins the counter line instead of taking a row of its own */
[data-theme="light"] .n4d-cw.cw-on .n4d-ced > .n4d-row{justify-content:flex-end;min-height:0}

/* the reader's side: tabs fit, quick checks under the preview */
[data-theme="light"] .n4d-cw.cw-on .n4d-cside .n4d-tabs{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:100%;overflow:visible !important;background:none !important;padding:0 !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-cside .n4d-tab{justify-content:center;min-height:40px;border-radius:999px !important;background:#f1ecff;color:#3a2a9a;white-space:nowrap}
[data-theme="light"] .n4d-cw.cw-on .n4d-cside .n4d-tab[aria-selected="true"]{background:#20184a;color:#fff}
[data-theme="light"] .n4d-cw.cw-on .n4d-cside .n4d-tab[aria-selected="true"] .sc-interp{color:#fff !important}
[data-theme="light"] .n4d-cw.cw-on #cw-cks{display:flex;flex-direction:column;gap:6px;margin-top:14px;background:#f7f3ff;border-radius:18px;padding:12px 14px;font-family:"Nunito",system-ui,sans-serif}
[data-theme="light"] .n4d-cw.cw-on #cw-cks b{font-size:13.5px;font-weight:900;color:#574f80}
[data-theme="light"] .n4d-cw.cw-on #cw-cks span{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:800;color:#20184a}
[data-theme="light"] .n4d-cw.cw-on #cw-cks span i{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:12px;font-weight:900;flex:none}
[data-theme="light"] .n4d-cw.cw-on #cw-cks .y i{background:#e0f4e3;color:#17603c}
[data-theme="light"] .n4d-cw.cw-on #cw-cks .n i{background:#fde3dc;color:#9c3413}
[data-theme="light"] .n4d-cw.cw-on .cw-link{align-self:flex-start;border:0;background:none;font:inherit;font-size:13.5px;font-weight:900;color:#3a2a9a;text-decoration:underline;cursor:pointer;padding:8px 0;min-height:36px}

/* AI studio folds to one line while the key is missing */
[data-theme="light"] .n4d-cw.cw-on .n4d-help.cw-ai-off{cursor:pointer;padding:12px 18px !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-help.cw-ai-off:not(.cw-ai-open) > *{display:none !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-help.cw-ai-off:not(.cw-ai-open)::after{content:attr(data-cw);font-size:13.5px;font-weight:800;color:#574f80}
}
@media (min-width:1000px){
[data-theme="light"] .n4d-cw.cw-on .n4d-cgrid{grid-template-columns:250px minmax(0,1fr) 300px !important;gap:14px}
[data-theme="light"] .n4d-cw.cw-on .cw-save{flex:1 1 100%;padding:0 6px}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced{padding:18px !important}
}
@media (min-width:1000px) and (max-width:1250px){[data-theme="light"] .n4d-cw.cw-on .n4d-cgrid{grid-template-columns:240px minmax(0,1fr) !important}}
@media (min-width:1000px){
/* list rows keep their height when the list is long; the list scrolls instead */
[data-theme="light"] .n4d-cw.cw-on .n4d-ci{flex:none !important;height:auto !important}
[data-theme="light"] .n4d-cw.cw-on .n4d-cis{overflow-y:auto}
/* the source sits beside the box only when the editor column is wide enough; otherwise it stays above it */
[data-theme="light"] .n4d-cw.cw-on .n4d-cmid{container-type:inline-size}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref){grid-template-columns:minmax(0,1fr)}
[data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref) > .n4d-cap,
[data-theme="light"] .n4d-cw.cw-on .n4d-ced > .n4d-ref{grid-column:1 / -1}
@container (min-width:600px){
  [data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref){grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
  [data-theme="light"] .n4d-cw.cw-on .n4d-ced > .n4d-ref{grid-column:1}
  [data-theme="light"] .n4d-cw.cw-on .n4d-ced:has(> .n4d-ref) > .n4d-cap{grid-column:2}
}
}
@media (min-width:1000px){
[data-theme="light"] .n4d-cw.cw-on .n4d-ci{max-height:none !important;overflow:visible;align-content:center;grid-auto-rows:auto}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci > b{align-self:end}
[data-theme="light"] .n4d-cw.cw-on .n4d-ci > .n4d-cim{align-self:start;position:static !important;height:auto !important;min-height:0 !important}
}
@media (min-width:1000px){
[data-theme="light"] .n4d-cw.cw-on #cw-dock .cw-n,[data-theme="light"] .n4d-cw.cw-on #cw-dock .cw-n *{font-family:"Nunito",system-ui,sans-serif !important;letter-spacing:normal !important}
}
