.studio .report-ready{
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:18px;
  padding:26px;
  margin:20px 0 28px;
  transition:background .2s,border-color .2s;
  box-shadow:none}

.studio .report-ready[data-ready-state=complete][data-tone=clear]{
  background:var(--surface);
  border-color:#638c70;
  color:var(--text)}
.studio .report-ready[data-ready-state=complete][data-tone=noted]{
  background:var(--surface);
  border-color:#aa873e;
  color:var(--text)}
.studio .report-ready[data-ready-state=complete][data-tone=followup]{
  background:var(--surface);
  border-color:#ad625a;
  color:var(--text)}

.studio .report-ready h2,.studio .report-ready label,.studio .report-ready legend,.studio .report-ready p,.studio .report-ready strong,.studio .report-ready small{
  color:inherit!important}
.report-ready h2{
  margin:6px 0!important;
  font-size:1.35rem}
.report-ready-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px}
.report-ready-heading>div>span{
  font-size:.9rem;
  font-weight:600}
.report-ready p{
  line-height:1.6}
.report-ready-summary{
  white-space:normal}
.report-ready-meta{
  font-size:.85rem}

.studio .report-ready-toggle{
  display:flex;
  align-items:center;
  gap:14px;
  background:transparent!important;
  color:inherit!important;
  border:0!important;
  padding:12px 0;
  box-shadow:none!important;
  white-space:nowrap;
  font:inherit;
  font-weight:600;
  cursor:pointer}
.report-ready-toggle i{
  width:52px;
  height:30px;
  background:var(--line);
  border-radius:30px;
  padding:4px;
  box-sizing:border-box}
.report-ready-toggle i:after{
  content:'';
  display:block;
  background:white;
  width:22px;
  height:22px;
  border-radius:50%;
  transition:transform .15s}
.report-ready-toggle[aria-checked=true] i{
  background:var(--accent)}
.report-ready-toggle[aria-checked=true] i:after{
  transform:translateX(22px)}
.report-ready-toggle:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:5px;
  border-radius:5px}

.studio .report-ready textarea{
  background:var(--bg)!important;
  color:var(--text)!important;
  border:1px solid var(--line)!important;
  box-sizing:border-box;
  width:100%;
  margin:8px 0 14px;
  min-height:110px}
.studio .report-ready .background-markers{
  border:0;
  padding:0;
  margin:18px 0}
.studio .report-ready .background-marker{
  background:transparent!important;
  color:inherit!important;
  border:0!important;
  box-shadow:none!important}
.studio .report-ready .background-marker:hover{
  border-color:currentColor!important}
.report-ready-finish{
  border-top:1px solid #8b9b994d;
  padding-top:18px;
  margin-top:16px}
.report-ready-finish p{
  font-size:.9rem;
  margin-bottom:0}
.report-ready [hidden]{
  display:none!important}
.report-ready [data-ready-save-status]{
  font-size:.9rem}

@media(max-width:760px){
  .report-ready-heading{
  align-items:flex-start;
  flex-direction:column;
  gap:6px}
.studio .report-ready{
  padding:20px}
.report-ready .background-marker-options{
  grid-template-columns:1fr}
}


.studio .report-ready .background-marker{
  display:block;
  position:relative;
  border:0!important;
  border-radius:12px;
  cursor:pointer}
.studio .report-ready .background-marker>span{
  border-radius:12px;
  background:transparent;
  box-shadow:none!important}
.studio .report-ready .background-marker:has(input:checked){
  border:0!important}
.studio .report-ready .background-marker:hover>span{
  border-color:var(--marker)!important}


/* Keep the editor calm;
   the selected result carries its own color. */
.studio .report-ready[data-ready-state=editing]{
  background:var(--surface);
  color:var(--text);
  border-color:var(--line)}

.studio .report-ready .background-marker{
  --choice-bg:#e0ece3;
  --marker:#52795e}

.studio .report-ready .marker-noted{
  --choice-bg:#f3ead5;
  --marker:#96752f}

.studio .report-ready .marker-followup{
  --choice-bg:#f1dfdb;
  --marker:#a25850}

.studio .report-ready .background-marker>span{
  border:3px solid var(--line)!important;
  background:transparent;
  transition:border-color .15s,background .15s}

.studio .report-ready .background-marker input:checked+span{
  border:3px solid var(--marker)!important;
  background:var(--choice-bg)!important}

.studio .report-ready .background-marker:has(input:enabled):hover>span{
  border:3px solid var(--marker)!important;
  background:var(--choice-bg)!important}

.studio .report-ready .background-marker input:focus-visible+span{
  outline:2px solid var(--marker);
  outline-offset:3px}


/* Override the modal-wide border reset only on the report card itself. */
.studio :is(dialog.case-workspace,dialog#board-dialog,dialog.ai-dialog) .report-ready{
  border-color:var(--line)}

.studio :is(dialog.case-workspace,dialog#board-dialog,dialog.ai-dialog) .report-ready[data-ready-state=editing]{
  border-color:var(--line)}

.studio :is(dialog.case-workspace,dialog#board-dialog,dialog.ai-dialog) .report-ready[data-ready-state=complete][data-tone=clear]{
  border-color:#638c70}

.studio :is(dialog.case-workspace,dialog#board-dialog,dialog.ai-dialog) .report-ready[data-ready-state=complete][data-tone=noted]{
  border-color:#aa873e}

.studio :is(dialog.case-workspace,dialog#board-dialog,dialog.ai-dialog) .report-ready[data-ready-state=complete][data-tone=followup]{
  border-color:#ad625a}


/* Shared dark studio surface;
   the toggle alone controls the active card border. */
.studio .report-ready[data-ready-state=editing]:has(.report-ready-toggle[aria-checked=true]){
  border-color:var(--accent-dark,#e7dcff)!important}

.studio .report-ready-toggle[aria-checked=true] i:after{
  background:var(--bg)}

.studio .report-ready .background-marker input:checked+span,
.studio .report-ready .background-marker:has(input:enabled):hover>span{
  color:#30283f!important}


.studio .report-ready textarea:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px}


.studio .report-ready .background-marker:has(input:checked){
  background:transparent!important}


/* Read-only result badges: gentle fills with matching, contrasting text and borders. */
.studio .report-ready .report-ready-badge{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  box-sizing:border-box;
  padding:7px 14px;
  border-radius:999px;
  font-size:.9rem;
  font-weight:650;
  line-height:1.4;
  background:var(--badge-bg,#eeeaf5)!important;
  border:1px solid var(--badge-line,#9685b1)!important;
  color:var(--badge-text,#433653)!important}

.studio .report-ready .report-ready-badge[data-result=clear]{
  --badge-bg:#e0ece3;
  --badge-line:#638c70;
  --badge-text:#294832}

.studio .report-ready .report-ready-badge[data-result=noted]{
  --badge-bg:#f3ead5;
  --badge-line:#aa873e;
  --badge-text:#60491b}

.studio .report-ready .report-ready-badge[data-result=followup]{
  --badge-bg:#f1dfdb;
  --badge-line:#ad625a;
  --badge-text:#683b34}


.studio .report-ready-heading>form{
  margin:0;
  flex:0 0 auto}
.studio .report-ready-heading>div{
  min-width:0}
.studio .report-ready[data-ready-state=complete] .report-ready-heading{
  flex-direction:row;
  align-items:flex-start}
.studio .report-ready-heading>form .btn{
  margin:0;
  white-space:nowrap}

