/* Shared foreground policy. Theme accents may decorate surfaces, never determine text contrast. */
:root {
 --ui-text:#272c2a; --ui-secondary:#505b55; --ui-link:#186b50; --ui-link-hover:#104a37;
 --ui-on-primary:#fff; --ui-disabled:#59625d; --ui-danger:#9a2d29;
}
html.merchant-orbit,html:has(link[href*="orbit.css"]),html:has(link[href*="guest.css"]),html:has(link[href*="storefront.css"]) {
 --ui-text:#eff3f1; --ui-secondary:#c1cbc6; --ui-link:#a2efce; --ui-link-hover:#d1f9e5;
 --ui-on-primary:#172820; --ui-disabled:#b5bfb9; --ui-danger:#ffc0b8;
}
/* A paper preview is always read as paper, independently of the surrounding theme. */
.document-paper,.document-preview-paper,.poster-canvas,.paper-sample,[data-paper-preview] {
 --ui-text:#272c2a; --ui-secondary:#505b55; --ui-link:#186b50; --ui-link-hover:#104a37;
 --text:var(--ui-text); --ink:var(--ui-text); --soft:var(--ui-secondary); --muted:var(--ui-secondary);
 color:var(--ui-text); color-scheme:light;
}
:root,html[data-theme] {
 --ink:var(--ui-text); --text:var(--ui-text); --muted:var(--ui-secondary); --soft:var(--ui-secondary);
 --blue:var(--ui-link); --blue-dark:var(--ui-link-hover); --leaf:var(--ui-link);
 --link-fg:var(--ui-link); --link-selected-fg:var(--ui-link); --link-hover-color:var(--ui-link-hover);
 --body-fg:var(--ui-text); --body-quiet-color:var(--ui-secondary);
}
a,a:visited {color:var(--ui-link)}
a:hover {color:var(--ui-link-hover)}
html :is(.nav-link.active,.nav-link:hover,.catalog-views [aria-selected=true],.catalog-views button:hover,.card-bottom>a,.task-model-picker summary strong,.picker-option[aria-pressed=true],.filter.active,.pill.blue,.tool-icon,.favorite.on,.appearance-open span,.chart-data summary,.nav-group a[aria-current]) {color:var(--ui-link)}
html :is(.subheading,.footnote,.card-bottom>span,.picker-note,.model-unavailable,.form-group small,.muted,.note,.status-note) {color:var(--ui-secondary)}
html :is(button,input,select,textarea):disabled,html [aria-disabled=true] {opacity:1;color:var(--ui-disabled);cursor:not-allowed}
html button:disabled {background:var(--raised,#edf0ee);border-color:var(--edge,#b9c3bd)}
html :is(.form-error,[role=alert]) {color:var(--ui-danger)}
html .document-paper :is(p,li,td,th,h1,h2,h3,strong,small) {color:inherit}
/* A status may be long; it must never squeeze a tool link into vertical characters. */
.tool-card {min-width:0}
.tool-card .card-bottom {display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px}
.tool-card .card-bottom>span {flex:1 1 140px;min-width:0;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.tool-card .card-bottom>a {display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;white-space:nowrap;min-height:44px;padding:4px 0;line-height:1.4;align-self:flex-end}
.tool-card .card-bottom>a svg {width:18px;height:18px;flex:none}
.tool-card .tool-icon svg,.glass-card>svg {fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.tool-card .tool-icon {background:transparent;color:var(--ui-link)}
.task-model-picker,.picker-list,.picker-option,.picker-option>span:first-child {min-width:0;max-width:100%;box-sizing:border-box}
.task-model-picker summary {white-space:normal;overflow-wrap:anywhere;line-height:1.5;min-height:44px}
.task-model-picker summary strong,.picker-option small {white-space:normal;word-break:normal;overflow-wrap:anywhere}
.task-model-picker .model-version-date {white-space:nowrap;display:inline-block}
.picker-option {min-height:44px;text-align:left}
.picker-mark {flex:none}
@media(max-width:600px) {
 .tool-card .card-bottom {gap:4px 12px}
 .tool-card .card-bottom>span {flex-basis:100%}
 .tool-card .card-bottom>a {margin-inline-start:auto}
 .picker-list {max-height:min(60dvh,520px);overflow:auto;overscroll-behavior:contain}
}
/* Filled actions need a dark neutral foreground, including previously visited links. */
html.merchant-orbit :is(.btn,.entry-submit,.pulse-primary):not(.secondary,.danger,.ghost):not(:disabled),
html.merchant-orbit a.btn:not(.secondary,.danger,.ghost):visited {
 color:#172820; background:var(--a,#a2efce);
}

/* Disabled controls remain readable and do not resemble enabled primary actions. */
html.merchant-orbit button:disabled,
html.merchant-orbit :is(.btn,.entry-submit,.pulse-primary):disabled,
html.merchant-orbit :is(input,select,textarea):disabled {
 color:var(--ui-disabled);background:var(--raised,#242b28);border-color:var(--edge,#53625a);opacity:1;
}
html.merchant-orbit .workbench-range button[aria-pressed=true],
html.merchant-orbit [data-workbench-period][aria-pressed=true] {color:#172820}
/* Industry chips need two readable columns on phones, not three squeezed cells. */
@media(max-width:650px){
 .industries{grid-template-columns:repeat(2,minmax(0,1fr))}
 .industries .industry{min-width:0;gap:8px;padding:12px 9px}
 .industries .industry>span:last-child{min-width:0}
 .industries .industry strong{font-size:13px;white-space:normal;overflow-wrap:anywhere}
 .industries .industry small{font-size:11px;line-height:1.5}
}

/* Skip links sit on a white surface even in a dark shell. */
html a.skip,html a.skip:visited,html a.skip:hover{color:#186b50;background:#fff}
