/* Owner Pricing tab (14 Nov 2026): one credit price, a derived table and chart, everything else under Advanced.
   Colours come from the app's theme tokens (brand.css / theme.css), so light and dark follow the user's appearance. */
.ownerPricing{
  /* Tokens only (b7): cost is caramel and what you keep is sage, the same pair the Metrics tab uses. */
  --op-card:var(--surface);--op-ink:var(--ink);--op-ink-2:var(--ink-2);--op-muted:var(--ink-3);
  --op-line:var(--hair);--op-line-2:var(--hair-2);--op-soft:var(--surface-2);
  --op-cost:var(--caramel);--op-keep:var(--sage);--op-bad:var(--status-error);--op-bad-soft:var(--status-error-tint);--op-ok:var(--sage-dk);--op-track:var(--hair-soft);
  --op-gap:16px;--op-pad:20px;--op-radius:12px;
  min-width:0;max-width:none;color:var(--op-ink);font-variant-numeric:tabular-nums;
}
.ownerPricing *,.ownerPricing *::before,.ownerPricing *::after{box-sizing:border-box}
.ownerPricing [hidden]{display:none!important}
.ownerPricing h2,.ownerPricing h3,.ownerPricing p{margin:0}

/* Header: title and one line on the left, compact client choice on the right. */
.ownerPricing .opHead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin:0 0 var(--op-gap)}
.ownerPricing .opHeadText{flex:1 1 320px;min-width:0}
.ownerPricing .opHead h2{font:400 24px/1.2 var(--disp);letter-spacing:-.2px;color:var(--op-ink);margin:0 0 6px}
.ownerPricing .opHead p{font-size:13px;line-height:1.5;color:var(--op-ink-2)}
.ownerPricing .opClient{display:flex;align-items:flex-end;gap:8px;flex:0 1 auto;min-width:0}
.ownerPricing .opClient label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--op-muted);min-width:0}
.ownerPricing .opClient select{width:200px;max-width:100%;min-width:0;height:36px;padding:0 34px 0 12px;font-size:13px;border-radius:8px}
.ownerPricing .opClient .btn{width:auto;margin:0;height:36px;padding:0 14px}
.ownerPricing .opPageNotice{font-size:13px;color:var(--op-ink-2);margin:0 0 var(--op-gap)}
.ownerPricing .opPageNotice:empty,.ownerPricing .opError:empty{display:none}
.ownerPricing .opError{font-size:13px;line-height:1.5;color:var(--op-bad);background:var(--op-bad-soft);border:1px solid var(--hair);border-radius:10px;padding:10px 14px;margin:0 0 var(--op-gap)}

/* Main card. */
.ownerPricing .opMain{display:flex;flex-direction:column;gap:var(--op-gap);background:var(--op-card);border:1px solid var(--op-line);border-radius:var(--op-radius);padding:var(--op-pad)}
.ownerPricing .opStatus{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;line-height:1.45;padding:12px 14px;border-radius:10px;background:var(--op-soft);color:var(--op-ink)}
.ownerPricing .opStatus::before{content:"";flex:0 0 10px;width:10px;height:10px;border-radius:50%;background:var(--op-muted)}
.ownerPricing .opStatus[data-kind="published"]::before{background:var(--op-keep)}
.ownerPricing .opStatus[data-kind="unpublished"]::before,.ownerPricing .opStatus[data-kind="renew"]::before{background:var(--op-cost)}
.ownerPricing .opStatus[data-kind="error"]::before{background:var(--op-bad)}
/* Loading uses the product's ring, small, in the status line. */
.ownerPricing .opStatus[data-kind="loading"]::before{flex-basis:14px;width:14px;height:14px;background:none;border:2px solid var(--hair-2);border-top-color:var(--iris);animation:workspace-loader-spin .85s linear infinite}
.ownerPricing .opNotice{font-size:13px;color:var(--op-ink-2)}
.ownerPricing .opMuted{font-size:12px;line-height:1.5;color:var(--op-muted)}

/* The one input. */
.ownerPricing .opPrice{display:flex;flex-direction:column;gap:var(--gap-label)}
.ownerPricing .opPriceLabel{font-size:13px;font-weight:600;color:var(--op-ink)}
.ownerPricing .opPriceRow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ownerPricing .opUnit{font-size:22px;font-weight:600;color:var(--op-ink-2)}
.ownerPricing .opRateInput{width:140px!important;max-width:100%;min-width:0;font-size:22px!important;font-weight:600;padding:8px 12px!important;text-align:right;font-variant-numeric:tabular-nums}
.ownerPricing .opPer{font-size:13px;color:var(--op-muted)}

/* Derived table. */
.ownerPricing .opTableWrap{overflow-x:auto;border:1px solid var(--op-line);border-radius:10px}
.ownerPricing .opTableWrap:focus-visible{outline:2px solid var(--iris);outline-offset:2px}
.ownerPricing .opTable{width:100%;border-collapse:collapse;font-size:13px}
.ownerPricing .opTable th,.ownerPricing .opTable td{padding:11px 14px;border-bottom:1px solid var(--op-line);text-align:left;vertical-align:top}
.ownerPricing .opTable thead th{font-size:11px;font-weight:500;color:var(--op-muted);background:var(--op-soft);white-space:nowrap}
.ownerPricing .opTable tbody tr:last-child>*{border-bottom:0}
.ownerPricing .opTable .opNum{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ownerPricing .opItem{display:block;font-weight:600;color:var(--op-ink)}
.ownerPricing .opRowNote{display:block;margin-top:3px;font-size:11px;font-weight:400;line-height:1.4;color:var(--op-muted);white-space:normal}
.ownerPricing .opKeepCell span{display:inline-block}
.ownerPricing .opKeepCell small{display:inline-block;min-width:3.2em;margin-left:6px;font-size:11px;color:var(--op-muted)}
.ownerPricing .opMini{margin-top:6px;margin-left:auto;width:100%;max-width:140px;height:8px}
.ownerPricing .opMiniSvg{display:block;width:100%;height:8px}
.ownerPricing .opRow.is-bad>*{background:var(--op-bad-soft)}
.ownerPricing .opRow.is-bad .opKeepCell,.ownerPricing .opRow.is-bad .opItem{color:var(--op-bad)}
.ownerPricing .opRow.is-off .opItem,.ownerPricing .opRow.is-chat .opItem{font-weight:500}
.ownerPricing .opRule{font-size:13px;line-height:1.5;padding:10px 14px;border-radius:10px}
.ownerPricing .opRule:empty{display:none}
.ownerPricing .opRule.is-ok{color:var(--op-ok);background:var(--op-track)}
.ownerPricing .opRule.is-bad{color:var(--op-bad);background:var(--op-bad-soft);font-weight:600}

/* SVG marks: classes and presentation attributes only (no style attributes). */
.ownerPricing .opTrack{fill:var(--op-track)}
.ownerPricing .opCost{fill:var(--op-cost)}
.ownerPricing .opKeep{fill:var(--op-keep)}
.ownerPricing .opKeep.is-bad{fill:var(--op-bad)}
.ownerPricing .opFloorTick{fill:var(--op-ink-2)}
.ownerPricing .opFloor{stroke:var(--op-ink-2);stroke-width:1.5;stroke-dasharray:4 3;fill:none}
.ownerPricing .opChart{margin:0;display:flex;flex-direction:column;gap:10px}
.ownerPricing .opChart figcaption{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;font-size:12px;font-weight:600;color:var(--op-ink-2)}
.ownerPricing .opLegend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;font-weight:400;color:var(--op-muted)}
.ownerPricing .opSwatch{display:inline-block;width:12px;height:8px;border-radius:2px;margin-left:6px}
.ownerPricing .opSwatchCost{background:var(--op-cost)}
.ownerPricing .opSwatchKeep{background:var(--op-keep)}
.ownerPricing .opSwatchFloor{width:2px;height:12px;background:var(--op-ink-2);border-radius:0}
.ownerPricing .opChartHost{min-width:0}
.ownerPricing .opChartSvg{display:block;width:100%;max-width:100%;height:auto;overflow:visible}
.ownerPricing .opChartLabel{font-size:12px;font-weight:600;fill:var(--op-ink)}
.ownerPricing .opChartValue{font-size:12px;fill:var(--op-ink-2);font-variant-numeric:tabular-nums}
.ownerPricing .opChartRow.is-bad .opChartValue,.ownerPricing .opChartRow.is-bad .opChartLabel{fill:var(--op-bad)}

/* Actions and step panels. */
.ownerPricing .opActions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.ownerPricing .opActions .btn{width:auto;margin:0;flex:0 0 auto;white-space:normal}
.ownerPricing .opPublish{font-size:13px;padding:11px 20px}
.ownerPricing .btn[disabled]{opacity:.5;cursor:not-allowed}
.ownerPricing .opPanel{display:flex;flex-direction:column;gap:12px;border:1px solid var(--op-line-2);border-radius:var(--op-radius);padding:var(--op-pad);background:var(--op-card)}
.ownerPricing .opPanel h3{font-size:16px;font-weight:600;line-height:1.35}
.ownerPricing .opPanel p{font-size:13px;line-height:1.5;color:var(--op-ink-2)}
/* 10.1: what this client's people are offered (one line per capability with an owner test and a price) */
.ownerPricing .opOffered{margin:0 0 var(--op-gap)}
.ownerPricing .opOffered[hidden]{display:none}
.ownerPricing .opOffered ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.ownerPricing .opOffered li{font-size:13px;line-height:1.5;color:var(--op-ink-2);overflow-wrap:anywhere}
.ownerPricing .opOffered strong{font-weight:600;color:var(--op-ink)}
.ownerPricing .opBig{font-size:20px!important;font-weight:600;color:var(--op-ink)!important}
.ownerPricing .opReview{border-color:var(--iris)}
.ownerPricing .opDone{border-color:var(--op-keep)}
.ownerPricing .opDone h3{color:var(--op-ok)}
.ownerPricing .opWarn{border-color:var(--op-cost)}
.ownerPricing .opConfirm{margin:0 0 var(--op-gap)}
.ownerPricing .opReviewList{list-style:none;margin:0;padding:0;border:1px solid var(--op-line);border-radius:10px}
.ownerPricing .opReviewList li{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;font-size:13px;border-bottom:1px solid var(--op-line)}
.ownerPricing .opReviewList li:last-child{border-bottom:0}

/* Advanced: one collapsed section, laid out like the rest of the product. */
.ownerPricing .opAdvanced{margin-top:var(--op-gap);border:1px solid var(--op-line);border-radius:var(--op-radius);background:var(--op-card)}
.ownerPricing .opAdvanced>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px;padding:16px var(--op-pad);font-size:14px;font-weight:600;color:var(--op-ink);border-radius:var(--op-radius)}
.ownerPricing .opAdvanced>summary::-webkit-details-marker{display:none}
.ownerPricing .opAdvanced>summary::before{content:"";width:6px;height:6px;border-right:1.6px solid var(--op-muted);border-bottom:1.6px solid var(--op-muted);transform:rotate(-45deg);transition:transform .15s ease}
.ownerPricing .opAdvanced[open]>summary::before{transform:rotate(45deg)}
.ownerPricing .opAdvanced>summary:focus-visible{outline:2px solid var(--iris);outline-offset:2px}
.ownerPricing .opAdvancedBody{display:flex;flex-direction:column;gap:24px;padding:4px var(--op-pad) var(--op-pad)}
.ownerPricing .opAdvancedBody>div:empty{display:none}
.ownerPricing .opAdvancedBody>div{display:flex;flex-direction:column;gap:24px}
.ownerPricing .opAdvSection,.ownerPricing .opExplorer{display:flex;flex-direction:column;gap:10px;padding-top:20px;border-top:1px solid var(--op-line)}
.ownerPricing .opAdvancedBody>div:first-child>.opAdvSection:first-child{border-top:0;padding-top:0}
.ownerPricing .opAdvSection h3,.ownerPricing .opExplorer h3{font-size:14px;font-weight:600;color:var(--op-ink)}
.ownerPricing .opAdvSection p{font-size:13px}
.ownerPricing .opAdvGrid,.ownerPricing .opExplorerForm{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px 16px;align-items:end}
.ownerPricing .opField{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:var(--op-ink-2)}
.ownerPricing .opField>span{font-weight:600;line-height:1.35}
.ownerPricing .opField small{font-size:11px;color:var(--op-muted)}
.ownerPricing .opField .input{width:100%;min-width:0;max-width:100%;margin:0}
.ownerPricing .opNumInput{text-align:right;font-variant-numeric:tabular-nums}
.ownerPricing .opWide{grid-column:1/-1;max-width:560px}
.ownerPricing .opExplorerForm .opActions{max-width:none}
.ownerPricing .opFileRow{display:flex;flex-wrap:wrap;gap:10px}
.ownerPricing .opFileRow .btn{width:auto;margin:0;position:relative}
.ownerPricing .opFileInput{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.ownerPricing .opFileLabel:focus-within{outline:2px solid var(--iris);outline-offset:2px}
.ownerPricing .opExplorerOut{display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:1.5;color:var(--op-ink-2)}
.ownerPricing .opExplorerOut:empty{display:none}
.ownerPricing .opExplorerChart{display:block;width:100%;max-width:640px;height:auto;margin-top:8px;background:var(--op-soft);border-radius:10px}
.ownerPricing .opExplorerChart .opChartLabel{font-weight:400;fill:var(--op-ink-2)}
.ownerPricing .opLineIn{stroke:var(--op-keep)}
.ownerPricing .opLineCost{stroke:var(--op-cost)}
.ownerPricing .opChartLegendIn{font-size:12px;font-weight:600;fill:var(--op-keep)}
.ownerPricing .opChartLegendCost{font-size:12px;font-weight:600;fill:var(--op-cost)}

/* Phone width: the table becomes one card per item; nothing touches an edge. */
@media (max-width:640px){
  .ownerPricing{--op-pad:16px}
  .ownerPricing .opClient{width:100%}
  .ownerPricing .opClient label{flex:1 1 auto}
  .ownerPricing .opClient select{width:100%}
  .ownerPricing .opTableWrap{overflow:visible;border:0}
  .ownerPricing .opTable,.ownerPricing .opTable tbody{display:block}
  .ownerPricing .opTable thead{display:none}
  .ownerPricing .opTable tr{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:12px 14px;border:1px solid var(--op-line);border-radius:10px;margin-bottom:10px}
  .ownerPricing .opTable tbody th{display:block;grid-column:1/-1;padding:0 0 4px;border:0;background:none}
  .ownerPricing .opTable td{display:flex;justify-content:space-between;grid-column:1/-1;gap:12px;padding:2px 0;border:0;background:none}
  .ownerPricing .opTable td::before{content:attr(data-label);color:var(--op-muted);text-align:left;white-space:normal}
  .ownerPricing .opTable td.opKeepCell{flex-wrap:wrap}
  .ownerPricing .opMini{flex-basis:100%;max-width:none}
  .ownerPricing .opRow.is-bad{background:var(--op-bad-soft)}
  .ownerPricing .opRow.is-bad>*{background:none}
  .ownerPricing .opRateInput{width:120px!important}
  .ownerPricing .opAdvGrid,.ownerPricing .opExplorerForm{grid-template-columns:1fr}
  .ownerPricing .opActions .btn{flex:1 1 100%}
}
@media (prefers-reduced-motion:reduce){.ownerPricing *,.ownerPricing *::before,.ownerPricing *::after{transition:none!important;animation:none!important}}
/* Spacing inside the derived block and between Advanced sections. */
.ownerPricing [data-op-body]{display:flex;flex-direction:column;gap:var(--op-gap);min-width:0}
.ownerPricing [data-op-flow]:empty{display:none}
.ownerPricing .opAdvSection~.opAdvSection{margin-top:24px}
@media (max-width:640px){
  .ownerPricing .opTable td.opKeepCell span{margin-left:auto}
  .ownerPricing .opTable td.opKeepCell small{min-width:0;margin-left:8px;align-self:center}
  .ownerPricing [data-op-body] .opRule{order:-1}
}
.ownerPricing .opReviewList li .opNum{white-space:nowrap;text-align:right}
